from Tkinter import *
import ttk
import time
import threading
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(4,GPIO.OUT)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(18,GPIO.OUT)
GPIO.setup(27,GPIO.OUT)
GPIO.setup(22,GPIO.OUT)
GPIO.setup(23,GPIO.OUT)
GPIO.setup(25,GPIO.OUT)
GPIO.setup(5,GPIO.OUT)
enable=4
gate=17
bit_1=5
bit_2=25
bit_3=23
bit_4=22
bit_5=27
bit_6=18
speed0=0.5
speed1=0.5
speed2=0.5
speed3=0.5
speed4=0.5
speed5=0.5
speed6=0.5
speed7=0.5
speed8=0.5
speed9=0.5
speed10=0.5
speed11=0.5
speed12=0.5
speed13=0.5
speed14=0.5
speed15=0.5
speed16=0.5
speed17=0.5
speed18=0.5
speed19=0.5
speed20=0.5
speed21=0.5
speed22=0.5
speed23=0.5
speed24=0.5
speed25=0.5
speed26=0.5
speed27=0.5
speed28=0.5
speed29=0.5
speed30=0.5
speed31=0.5
repeat=0.5
loop=1
counter = 1
chan_list = (bit_1,bit_2,bit_3,bit_4,bit_5,bit_6)
def init(root):
root.title("RPi Maplin 3800 Synthesiser Sequencer v2.2.2")
def f0():
global speed0
if speed0 <= 0.05:
return
speed0=speed0 - 0.025
show_speed0.set(speed0)
showspeed0.configure(text=show_speed0.get())
def f1():
global speed1
if speed1 <= 0.05:
return
speed1=speed1 - 0.025
show_speed1.set(speed1)
showspeed1.configure(text=show_speed1.get())
def f2():
global speed2
if speed2 <= 0.05:
return
speed2=speed2 - 0.025
show_speed2.set(speed2)
showspeed2.configure(text=show_speed2.get())
def f3():
global speed3
if speed3 <= 0.05:
return
speed3=speed3 - 0.025
show_speed3.set(speed3)
showspeed3.configure(text=show_speed3.get())
def f4():
global speed4
if speed4 <= 0.05:
return
speed4=speed4 - 0.025
show_speed4.set(speed4)
showspeed4.configure(text=show_speed4.get())
def f5():
global speed5
if speed5 <= 0.05:
return
speed5=speed5 - 0.025
show_speed5.set(speed5)
showspeed5.configure(text=show_speed5.get())
def f6():
global speed6
if speed6 <= 0.05:
return
speed6=speed6 - 0.025
show_speed6.set(speed6)
showspeed6.configure(text=show_speed6.get())
def f7():
global speed7
if speed7 <= 0.05:
return
speed7=speed7 - 0.025
show_speed7.set(speed7)
showspeed7.configure(text=show_speed7.get())
def f8():
global speed8
if speed8 <= 0.05:
return
speed8=speed8 - 0.025
show_speed8.set(speed8)
showspeed8.configure(text=show_speed8.get())
def f9():
global speed9
if speed9 <= 0.05:
return
speed9=speed9 - 0.025
show_speed9.set(speed9)
showspeed9.configure(text=show_speed9.get())
def f10():
global speed10
if speed10 <= 0.05:
return
speed10=speed10 - 0.025
show_speed10.set(speed10)
showspeed10.configure(text=show_speed10.get())
def f11():
global speed11
if speed11 <= 0.05:
return
speed11=speed11 - 0.025
show_speed11.set(speed11)
showspeed11.configure(text=show_speed11.get())
def f12():
global speed12
if speed12 <= 0.05:
return
speed12=speed12 - 0.025
show_speed12.set(speed12)
showspeed12.configure(text=show_speed12.get())
def f13():
global speed13
if speed13 <= 0.05:
return
speed13=speed13 - 0.025
show_speed13.set(speed13)
showspeed13.configure(text=show_speed13.get())
def f14():
global speed14
if speed14 <= 0.05:
return
speed14=speed14 - 0.025
show_speed14.set(speed14)
showspeed14.configure(text=show_speed14.get())
def f15():
global speed15
if speed15 <= 0.05:
return
speed15=speed15 - 0.025
show_speed15.set(speed15)
showspeed15.configure(text=show_speed15.get())
def f16():
global speed16
if speed16 <= 0.05:
return
speed16=speed16 - 0.025
show_speed16.set(speed16)
showspeed16.configure(text=show_speed16.get())
def f17():
global speed17
if speed17 <= 0.05:
return
speed17=speed17 - 0.025
show_speed17.set(speed17)
showspeed17.configure(text=show_speed17.get())
def f18():
global speed18
if speed18 <= 0.05:
return
speed18=speed18 - 0.025
show_speed18.set(speed18)
showspeed18.configure(text=show_speed18.get())
def f19():
global speed19
if speed19 <= 0.05:
return
speed19=speed19 - 0.025
show_speed19.set(speed19)
showspeed19.configure(text=show_speed19.get())
def f20():
global speed20
if speed20 <= 0.05:
return
speed20=speed20 - 0.025
show_speed20.set(speed20)
showspeed20.configure(text=show_speed20.get())
def f21():
global speed21
if speed21 <= 0.05:
return
speed21=speed21 - 0.025
show_speed21.set(speed21)
showspeed21.configure(text=show_speed21.get())
def f22():
global speed22
if speed22 <= 0.05:
return
speed22=speed22 - 0.025
show_speed22.set(speed22)
showspeed22.configure(text=show_speed22.get())
def f23():
global speed23
if speed23 <= 0.05:
return
speed23=speed23 - 0.025
show_speed23.set(speed23)
showspeed23.configure(text=show_speed23.get())
def f24():
global speed24
if speed24 <= 0.05:
return
speed24=speed24 - 0.025
show_speed24.set(speed24)
showspeed24.configure(text=show_speed24.get())
def f25():
global speed25
if speed25 <= 0.05:
return
speed25=speed25 - 0.025
show_speed25.set(speed25)
showspeed25.configure(text=show_speed25.get())
def f26():
global speed26
if speed26 <= 0.05:
return
speed26=speed26 - 0.025
show_speed26.set(speed26)
showspeed26.configure(text=show_speed26.get())
def f27():
global speed27
if speed27 <= 0.05:
return
speed27=speed27 - 0.025
show_speed27.set(speed27)
showspeed27.configure(text=show_speed27.get())
def f28():
global speed28
if speed28 <= 0.05:
return
speed28=speed28 - 0.025
show_speed28.set(speed28)
showspeed28.configure(text=show_speed28.get())
def f29():
global speed29
if speed29 <= 0.05:
return
speed29=speed29 - 0.025
show_speed29.set(speed29)
showspeed29.configure(text=show_speed29.get())
def f30():
global speed30
if speed30 <= 0.05:
return
speed30=speed30 - 0.025
show_speed30.set(speed30)
showspeed30.configure(text=show_speed30.get())
def f31():
global speed31
if speed31 <= 0.05:
return
speed31=speed31 - 0.025
show_speed31.set(speed31)
showspeed31.configure(text=show_speed31.get())
def s0():
global speed0
speed0 = speed0 + 0.025
show_speed0.set(speed0)
showspeed0.configure(text=show_speed0.get())
def s1():
global speed1
speed1 = speed1 + 0.025
show_speed1.set(speed1)
showspeed1.configure(text=show_speed1.get())
def s2():
global speed2
speed2 = speed2 + 0.025
show_speed2.set(speed2)
showspeed2.configure(text=show_speed2.get())
def s3():
global speed3
speed3 = speed3 + 0.025
show_speed3.set(speed3)
showspeed3.configure(text=show_speed3.get())
def s4():
global speed4
speed4 = speed4 + 0.025
show_speed4.set(speed4)
showspeed4.configure(text=show_speed4.get())
def s5():
global speed5
speed5 = speed5 + 0.025
show_speed5.set(speed5)
showspeed5.configure(text=show_speed5.get())
def s6():
global speed6
speed6 = speed6 + 0.025
show_speed6.set(speed6)
showspeed6.configure(text=show_speed6.get())
def s7():
global speed7
speed7 = speed7 + 0.025
show_speed7.set(speed7)
showspeed7.configure(text=show_speed7.get())
def s8():
global speed8
speed8 = speed8 + 0.025
show_speed8.set(speed8)
showspeed8.configure(text=show_speed8.get())
def s9():
global speed9
speed9 = speed9 + 0.025
show_speed9.set(speed9)
showspeed9.configure(text=show_speed9.get())
def s10():
global speed10
speed10 = speed10 + 0.025
show_speed10.set(speed10)
showspeed10.configure(text=show_speed10.get())
def s11():
global speed11
speed11 = speed11 + 0.025
show_speed11.set(speed11)
showspeed11.configure(text=show_speed11.get())
def s12():
global speed12
speed12 = speed12 + 0.025
show_speed12.set(speed12)
showspeed12.configure(text=show_speed12.get())
def s13():
global speed13
speed13 = speed13 + 0.025
show_speed13.set(speed13)
showspeed13.configure(text=show_speed13.get())
def s14():
global speed14
speed14 = speed14 + 0.025
show_speed14.set(speed14)
showspeed14.configure(text=show_speed14.get())
def s15():
global speed15
speed15 = speed15 + 0.025
show_speed15.set(speed15)
showspeed15.configure(text=show_speed15.get())
def s16():
global speed16
speed16 = speed16 + 0.025
show_speed16.set(speed16)
showspeed16.configure(text=show_speed16.get())
def s17():
global speed17
speed17 = speed17 + 0.025
show_speed17.set(speed17)
showspeed17.configure(text=show_speed17.get())
def s18():
global speed18
speed18 = speed18 + 0.025
show_speed18.set(speed18)
showspeed18.configure(text=show_speed18.get())
def s19():
global speed19
speed19 = speed19 + 0.025
show_speed19.set(speed19)
showspeed19.configure(text=show_speed19.get())
def s20():
global speed20
speed20 = speed20 + 0.025
show_speed20.set(speed20)
showspeed20.configure(text=show_speed20.get())
def s21():
global speed21
speed21 = speed21 + 0.025
show_speed21.set(speed21)
showspeed21.configure(text=show_speed21.get())
def s22():
global speed22
speed22 = speed22 + 0.025
show_speed22.set(speed22)
showspeed22.configure(text=show_speed22.get())
def s23():
global speed23
speed23 = speed23 + 0.025
show_speed23.set(speed23)
showspeed23.configure(text=show_speed23.get())
def s24():
global speed24
speed24 = speed24 + 0.025
show_speed24.set(speed24)
showspeed24.configure(text=show_speed24.get())
def s25():
global speed25
speed25 = speed25 + 0.025
show_speed25.set(speed25)
showspeed25.configure(text=show_speed25.get())
def s26():
global speed26
speed26 = speed26 + 0.025
show_speed26.set(speed26)
showspeed26.configure(text=show_speed26.get())
def s27():
global speed27
speed27 = speed27 + 0.025
show_speed27.set(speed27)
showspeed27.configure(text=show_speed27.get())
def s28():
global speed28
speed28 = speed28 + 0.025
show_speed28.set(speed28)
showspeed28.configure(text=show_speed28.get())
def s29():
global speed29
speed29 = speed29 + 0.025
show_speed29.set(speed29)
showspeed29.configure(text=show_speed29.get())
def s30():
global speed30
speed30 = speed30 + 0.025
show_speed30.set(speed30)
showspeed30.configure(text=show_speed30.get())
def s31():
global speed31
speed31 = speed31 + 0.025
show_speed31.set(speed31)
showspeed31.configure(text=show_speed31.get())
def repeatup():
global repeat
if repeat <= 0.05:
return
repeat=repeat - 0.025
show_repeat.set(repeat)
showrepeat.configure(text=show_repeat.get())
def repeatdn():
global repeat
repeat = repeat + 0.025
show_repeat.set(repeat)
showrepeat.configure(text=show_repeat.get())
def loopup():
global loop, counter
loop=loop + 1
show_loop.set(loop)
showloop.configure(text=show_loop.get())
counter=loop
def loopdn():
global loop, counter
if loop <= 1:
return
loop = loop - 1
show_loop.set(loop)
showloop.configure(text=show_loop.get())
counter=loop
def play():
c1.set("light blue")
nameb0_0.configure(background=c1.get())
GPIO.output(chan_list, (b0_0var.get(), b0_1var.get(), b0_2var.get(), b0_3var.get(), b0_4var.get(), b0_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed0)
GPIO.output(gate, 0)
c1.set("gray84")
nameb0_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b0_7var.get() == 1:
return
c1.set("light blue")
nameb1_0.configure(background=c1.get())
GPIO.output(chan_list, (b1_0var.get(),b1_1var.get(),b1_2var.get(),b1_3var.get(),b1_4var.get(),b1_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed1)
GPIO.output(gate, 0)
c1.set("gray84")
nameb1_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b1_7var.get() == 1:
return
c1.set("light blue")
nameb2_0.configure(background=c1.get())
GPIO.output(chan_list, (b2_0var.get(),b2_1var.get(),b2_2var.get(),b2_3var.get(),b2_4var.get(),b2_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed2)
GPIO.output(gate, 0)
c1.set("gray84")
nameb2_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b2_7var.get() == 1:
return
c1.set("light blue")
nameb3_0.configure(background=c1.get())
GPIO.output(chan_list, (b3_0var.get(),b3_1var.get(),b3_2var.get(),b3_3var.get(),b3_4var.get(),b3_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed3)
GPIO.output(gate, 0)
c1.set("gray84")
nameb3_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b3_7var.get() == 1:
return
c1.set("light blue")
nameb4_0.configure(background=c1.get())
GPIO.output(chan_list, (b4_0var.get(),b4_1var.get(),b4_2var.get(),b4_3var.get(),b4_4var.get(),b4_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed4)
GPIO.output(gate, 0)
c1.set("gray84")
nameb4_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b4_7var.get() == 1:
return
c1.set("light blue")
nameb5_0.configure(background=c1.get())
GPIO.output(chan_list, (b5_0var.get(),b5_1var.get(),b5_2var.get(),b5_3var.get(),b5_4var.get(),b5_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed5)
GPIO.output(gate, 0)
c1.set("gray84")
nameb5_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b5_7var.get() == 1:
return
c1.set("light blue")
nameb6_0.configure(background=c1.get())
GPIO.output(chan_list, (b6_0var.get(),b6_1var.get(),b6_2var.get(),b6_3var.get(),b6_4var.get(),b6_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed6)
GPIO.output(gate, 0)
c1.set("gray84")
nameb6_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b6_7var.get() == 1:
return
c1.set("light blue")
nameb7_0.configure(background=c1.get())
GPIO.output(chan_list, (b7_0var.get(),b7_1var.get(),b7_2var.get(),b7_3var.get(),b7_4var.get(),b7_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed7)
GPIO.output(gate, 0)
c1.set("gray84")
nameb7_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b7_7var.get() == 1:
return
c1.set("light blue")
nameb8_0.configure(background=c1.get())
GPIO.output(chan_list, (b8_0var.get(),b8_1var.get(),b8_2var.get(),b8_3var.get(),b8_4var.get(),b8_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed8)
GPIO.output(gate, 0)
c1.set("gray84")
nameb8_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b8_7var.get() == 1:
return
c1.set("light blue")
nameb9_0.configure(background=c1.get())
GPIO.output(chan_list, (b9_0var.get(),b9_1var.get(),b9_2var.get(),b9_3var.get(),b9_4var.get(),b9_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed9)
GPIO.output(gate, 0)
c1.set("gray84")
nameb9_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b9_7var.get() == 1:
return
c1.set("light blue")
nameb10_0.configure(background=c1.get())
GPIO.output(chan_list, (b10_0var.get(),b10_1var.get(),b10_2var.get(),b10_3var.get(),b10_4var.get(),b10_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed10)
GPIO.output(gate, 0)
c1.set("gray84")
nameb10_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b10_7var.get() == 1:
return
c1.set("light blue")
nameb11_0.configure(background=c1.get())
GPIO.output(chan_list, (b11_0var.get(),b11_1var.get(),b11_2var.get(),b11_3var.get(),b11_4var.get(),b11_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed11)
GPIO.output(gate, 0)
c1.set("gray84")
nameb11_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b11_7var.get() == 1:
return
c1.set("light blue")
nameb12_0.configure(background=c1.get())
GPIO.output(chan_list, (b12_0var.get(),b12_1var.get(),b12_2var.get(),b12_3var.get(),b12_4var.get(),b12_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed12)
GPIO.output(gate, 0)
c1.set("gray84")
nameb12_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b12_7var.get() == 1:
return
c1.set("light blue")
nameb13_0.configure(background=c1.get())
GPIO.output(chan_list, (b13_0var.get(),b13_1var.get(),b13_2var.get(),b13_3var.get(),b13_4var.get(),b13_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed13)
GPIO.output(gate, 0)
c1.set("gray84")
nameb13_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b13_7var.get() == 1:
return
c1.set("light blue")
nameb14_0.configure(background=c1.get())
GPIO.output(chan_list, (b14_0var.get(),b14_1var.get(),b14_2var.get(),b14_3var.get(),b14_4var.get(),b14_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed14)
GPIO.output(gate, 0)
c1.set("gray84")
nameb14_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b14_7var.get() == 1:
return
c1.set("light blue")
nameb15_0.configure(background=c1.get())
GPIO.output(chan_list, (b15_0var.get(),b15_1var.get(),b15_2var.get(),b15_3var.get(),b15_4var.get(),b15_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed15)
GPIO.output(gate, 0)
c1.set("gray84")
nameb15_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b15_7var.get() == 1:
return
c1.set("light blue")
nameb16_0.configure(background=c1.get())
GPIO.output(chan_list, (b16_0var.get(),b16_1var.get(),b16_2var.get(),b16_3var.get(),b16_4var.get(),b16_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed16)
GPIO.output(gate, 0)
c1.set("gray84")
nameb16_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b16_7var.get() == 1:
return
c1.set("light blue")
nameb17_0.configure(background=c1.get())
GPIO.output(chan_list, (b17_0var.get(),b17_1var.get(),b17_2var.get(),b17_3var.get(),b17_4var.get(),b17_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed17)
GPIO.output(gate, 0)
c1.set("gray84")
nameb17_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b17_7var.get() == 1:
return
c1.set("light blue")
nameb18_0.configure(background=c1.get())
GPIO.output(chan_list, (b18_0var.get(),b18_1var.get(),b18_2var.get(),b18_3var.get(),b18_4var.get(),b18_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed18)
GPIO.output(gate, 0)
c1.set("gray84")
nameb18_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b18_7var.get() == 1:
return
c1.set("light blue")
nameb19_0.configure(background=c1.get())
GPIO.output(chan_list, (b19_0var.get(),b19_1var.get(),b19_2var.get(),b19_3var.get(),b19_4var.get(),b19_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed19)
GPIO.output(gate, 0)
c1.set("gray84")
nameb19_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b19_7var.get() == 1:
return
c1.set("light blue")
nameb20_0.configure(background=c1.get())
GPIO.output(chan_list, (b20_0var.get(),b20_1var.get(),b20_2var.get(),b20_3var.get(),b20_4var.get(),b20_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed20)
GPIO.output(gate, 0)
c1.set("gray84")
nameb20_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b20_7var.get() == 1:
return
c1.set("light blue")
nameb21_0.configure(background=c1.get())
GPIO.output(chan_list, (b21_0var.get(),b21_1var.get(),b21_2var.get(),b21_3var.get(),b21_4var.get(),b21_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed21)
GPIO.output(gate, 0)
c1.set("gray84")
nameb21_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b21_7var.get() == 1:
return
c1.set("light blue")
nameb22_0.configure(background=c1.get())
GPIO.output(chan_list, (b22_0var.get(),b22_1var.get(),b22_2var.get(),b22_3var.get(),b22_4var.get(),b22_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed22)
GPIO.output(gate, 0)
c1.set("gray84")
nameb22_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b22_7var.get() == 1:
return
c1.set("light blue")
nameb23_0.configure(background=c1.get())
GPIO.output(chan_list, (b23_0var.get(),b23_1var.get(),b23_2var.get(),b23_3var.get(),b23_4var.get(),b23_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed23)
GPIO.output(gate, 0)
c1.set("gray84")
nameb23_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b23_7var.get() == 1:
return
c1.set("light blue")
nameb24_0.configure(background=c1.get())
GPIO.output(chan_list, (b24_0var.get(),b24_1var.get(),b24_2var.get(),b24_3var.get(),b24_4var.get(),b24_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed24)
GPIO.output(gate, 0)
c1.set("gray84")
nameb24_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b24_7var.get() == 1:
return
c1.set("light blue")
nameb25_0.configure(background=c1.get())
GPIO.output(chan_list, (b25_0var.get(),b25_1var.get(),b25_2var.get(),b25_3var.get(),b25_4var.get(),b25_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed25)
GPIO.output(gate, 0)
c1.set("gray84")
nameb25_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b25_7var.get() == 1:
return
c1.set("light blue")
nameb26_0.configure(background=c1.get())
GPIO.output(chan_list, (b26_0var.get(),b26_1var.get(),b26_2var.get(),b26_3var.get(),b26_4var.get(),b26_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed26)
GPIO.output(gate, 0)
c1.set("gray84")
nameb26_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b26_7var.get() == 1:
return
c1.set("light blue")
nameb27_0.configure(background=c1.get())
GPIO.output(chan_list, (b27_0var.get(),b27_1var.get(),b27_2var.get(),b27_3var.get(),b27_4var.get(),b27_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed27)
GPIO.output(gate, 0)
c1.set("gray84")
nameb27_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b27_7var.get() == 1:
return
c1.set("light blue")
nameb28_0.configure(background=c1.get())
GPIO.output(chan_list, (b28_0var.get(),b28_1var.get(),b28_2var.get(),b28_3var.get(),b28_4var.get(),b28_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed28)
GPIO.output(gate, 0)
c1.set("gray84")
nameb28_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b28_7var.get() == 1:
return
c1.set("light blue")
nameb29_0.configure(background=c1.get())
GPIO.output(chan_list, (b29_0var.get(),b29_1var.get(),b29_2var.get(),b29_3var.get(),b29_4var.get(),b29_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed29)
GPIO.output(gate, 0)
c1.set("gray84")
nameb29_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b29_7var.get() == 1:
return
c1.set("light blue")
nameb30_0.configure(background=c1.get())
GPIO.output(chan_list, (b30_0var.get(),b30_1var.get(),b30_2var.get(),b30_3var.get(),b30_4var.get(),b30_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed30)
GPIO.output(gate, 0)
c1.set("gray84")
nameb30_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b30_7var.get() == 1:
return
c1.set("light blue")
nameb31_0.configure(background=c1.get())
GPIO.output(chan_list, (b31_0var.get(),b31_1var.get(),b31_2var.get(),b31_3var.get(),b31_4var.get(),b31_5var.get()))
GPIO.output(enable, 1)
time.sleep(0.0005)
GPIO.output(enable, 0)
GPIO.output(gate, 1)
time.sleep(speed31)
GPIO.output(gate, 0)
c1.set("gray84")
nameb31_0.configure(background=c1.get())
if stop_var.get()==1:
return
if b31_7var.get() == 1:
return
def start():
if stop_var.get()== 1:
stop_0.invoke()
def loop_0():
def loop_1():
global counter
if stop_var.get()== 1:
counter=loop
return
play()
time.sleep(repeat)
counter=counter-1
if counter==1:
counter=loop
return
else:
loop_1()
loop_1()
def run():
while True:
if stop_var.get()== 1:
stop_0.invoke()
return
if loop_var.get() == 1:
counter=loop
if counter==1:
None
else:
loop_0()
if b0_6var.get() == 1:
time.sleep(repeat)
play()
GPIO.output(enable, 0)
GPIO.output(gate, 0)
else:
if stop_var.get()== 1:
counter=loop
stop_0.invoke()
return
play()
GPIO.output(enable, 0)
GPIO.output(gate, 0)
return
t = threading.Thread(target=run)
t.daemon=True
t.start()
def stop():
def halt():
if stop_var.get() == 0:
stop_0.invoke()
t1 = threading.Thread(target=halt)
t1.daemon=True
t1.start()
def toggle_inf():
if loop_var.get() and b0_6var.get() == 1:
b0_6.invoke()
def toggle_loop():
if loop_var.get() and b0_6var.get() == 1:
loop_0.invoke()
def reset():
global b0_7var
if b0_0var.get()>0:
b0_0.invoke()
if b0_1var.get()>0:
b0_1.invoke()
if b0_2var.get()>0:
b0_2.invoke()
if b0_3var.get()>0:
b0_3.invoke()
if b0_4var.get()>0:
b0_4.invoke()
if b0_5var.get()>0:
b0_5.invoke()
if b0_6var.get()>0:
b0_6.invoke()
if b0_7var.get()>0:
b0_7.invoke()
if b1_0var.get()>0:
b1_0.invoke()
if b1_1var.get()>0:
b1_1.invoke()
if b1_2var.get()>0:
b1_2.invoke()
if b1_3var.get()>0:
b1_3.invoke()
if b1_4var.get()>0:
b1_4.invoke()
if b1_5var.get()>0:
b1_5.invoke()
if b1_7var.get()>0:
b1_7.invoke()
if b2_0var.get()>0:
b2_0.invoke()
if b2_1var.get()>0:
b2_1.invoke()
if b2_2var.get()>0:
b2_2.invoke()
if b2_3var.get()>0:
b2_3.invoke()
if b2_4var.get()>0:
b2_4.invoke()
if b2_5var.get()>0:
b2_5.invoke()
if b2_7var.get()>0:
b2_7.invoke()
if b3_0var.get()>0:
b3_0.invoke()
if b3_1var.get()>0:
b3_1.invoke()
if b3_2var.get()>0:
b3_2.invoke()
if b3_3var.get()>0:
b3_3.invoke()
if b3_4var.get()>0:
b3_4.invoke()
if b3_5var.get()>0:
b3_5.invoke()
if b3_7var.get()>0:
b3_7.invoke()
if b4_0var.get()>0:
b4_0.invoke()
if b4_1var.get()>0:
b4_1.invoke()
if b4_2var.get()>0:
b4_2.invoke()
if b4_3var.get()>0:
b4_3.invoke()
if b4_4var.get()>0:
b4_4.invoke()
if b4_5var.get()>0:
b4_5.invoke()
if b4_7var.get()>0:
b4_7.invoke()
if b5_0var.get()>0:
b5_0.invoke()
if b5_1var.get()>0:
b5_1.invoke()
if b5_2var.get()>0:
b5_2.invoke()
if b5_3var.get()>0:
b5_3.invoke()
if b5_4var.get()>0:
b5_4.invoke()
if b5_5var.get()>0:
b5_5.invoke()
if b5_7var.get()>0:
b5_7.invoke()
if b6_0var.get()>0:
b6_0.invoke()
if b6_1var.get()>0:
b6_1.invoke()
if b6_2var.get()>0:
b6_2.invoke()
if b6_3var.get()>0:
b6_3.invoke()
if b6_4var.get()>0:
b6_4.invoke()
if b6_5var.get()>0:
b6_5.invoke()
if b6_7var.get()>0:
b6_7.invoke()
if b7_0var.get()>0:
b7_0.invoke()
if b7_1var.get()>0:
b7_1.invoke()
if b7_2var.get()>0:
b7_2.invoke()
if b7_3var.get()>0:
b7_3.invoke()
if b7_4var.get()>0:
b7_4.invoke()
if b7_5var.get()>0:
b7_5.invoke()
if b7_7var.get()>0:
b7_7.invoke()
if b8_0var.get()>0:
b8_0.invoke()
if b8_1var.get()>0:
b8_1.invoke()
if b8_2var.get()>0:
b8_2.invoke()
if b8_3var.get()>0:
b8_3.invoke()
if b8_4var.get()>0:
b8_4.invoke()
if b8_5var.get()>0:
b8_5.invoke()
if b8_7var.get()>0:
b8_7.invoke()
if b9_0var.get()>0:
b9_0.invoke()
if b9_1var.get()>0:
b9_1.invoke()
if b9_2var.get()>0:
b9_2.invoke()
if b9_3var.get()>0:
b9_3.invoke()
if b9_4var.get()>0:
b9_4.invoke()
if b9_5var.get()>0:
b9_5.invoke()
if b9_7var.get()>0:
b9_7.invoke()
if b10_0var.get()>0:
b10_0.invoke()
if b10_1var.get()>0:
b10_1.invoke()
if b10_2var.get()>0:
b10_2.invoke()
if b10_3var.get()>0:
b10_3.invoke()
if b10_4var.get()>0:
b10_4.invoke()
if b10_5var.get()>0:
b10_5.invoke()
if b10_7var.get()>0:
b10_7.invoke()
if b11_0var.get()>0:
b11_0.invoke()
if b11_1var.get()>0:
b11_1.invoke()
if b11_2var.get()>0:
b11_2.invoke()
if b11_3var.get()>0:
b11_3.invoke()
if b11_4var.get()>0:
b11_4.invoke()
if b11_5var.get()>0:
b11_5.invoke()
if b11_7var.get()>0:
b11_7.invoke()
if b12_0var.get()>0:
b12_0.invoke()
if b12_1var.get()>0:
b12_1.invoke()
if b12_2var.get()>0:
b12_2.invoke()
if b12_3var.get()>0:
b12_3.invoke()
if b12_4var.get()>0:
b12_4.invoke()
if b12_5var.get()>0:
b12_5.invoke()
if b12_7var.get()>0:
b12_7.invoke()
if b13_0var.get()>0:
b13_0.invoke()
if b13_1var.get()>0:
b13_1.invoke()
if b13_2var.get()>0:
b13_2.invoke()
if b13_3var.get()>0:
b13_3.invoke()
if b13_4var.get()>0:
b13_4.invoke()
if b13_5var.get()>0:
b13_5.invoke()
if b13_7var.get()>0:
b13_7.invoke()
if b14_0var.get()>0:
b14_0.invoke()
if b14_1var.get()>0:
b14_1.invoke()
if b14_2var.get()>0:
b14_2.invoke()
if b14_3var.get()>0:
b14_3.invoke()
if b14_4var.get()>0:
b14_4.invoke()
if b14_5var.get()>0:
b14_5.invoke()
if b14_7var.get()>0:
b14_7.invoke()
if b15_0var.get()>0:
b15_0.invoke()
if b15_1var.get()>0:
b15_1.invoke()
if b15_2var.get()>0:
b15_2.invoke()
if b15_3var.get()>0:
b15_3.invoke()
if b15_4var.get()>0:
b15_4.invoke()
if b15_5var.get()>0:
b15_5.invoke()
if b15_7var.get()>0:
b15_7.invoke()
if b16_0var.get()>0:
b16_0.invoke()
if b16_1var.get()>0:
b16_1.invoke()
if b16_2var.get()>0:
b16_2.invoke()
if b16_3var.get()>0:
b16_3.invoke()
if b16_4var.get()>0:
b16_4.invoke()
if b16_5var.get()>0:
b16_5.invoke()
if b16_7var.get()>0:
b16_7.invoke()
if b17_0var.get()>0:
b17_0.invoke()
if b17_1var.get()>0:
b17_1.invoke()
if b17_2var.get()>0:
b17_2.invoke()
if b17_3var.get()>0:
b17_3.invoke()
if b17_4var.get()>0:
b17_4.invoke()
if b17_5var.get()>0:
b17_5.invoke()
if b17_7var.get()>0:
b17_7.invoke()
if b18_0var.get()>0:
b18_0.invoke()
if b18_1var.get()>0:
b18_1.invoke()
if b18_2var.get()>0:
b18_2.invoke()
if b18_3var.get()>0:
b18_3.invoke()
if b18_4var.get()>0:
b18_4.invoke()
if b18_5var.get()>0:
b18_5.invoke()
if b18_7var.get()>0:
b18_7.invoke()
if b19_0var.get()>0:
b19_0.invoke()
if b19_1var.get()>0:
b19_1.invoke()
if b19_2var.get()>0:
b19_2.invoke()
if b19_3var.get()>0:
b19_3.invoke()
if b19_4var.get()>0:
b19_4.invoke()
if b19_5var.get()>0:
b19_5.invoke()
if b19_7var.get()>0:
b19_7.invoke()
if b20_0var.get()>0:
b20_0.invoke()
if b20_1var.get()>0:
b20_1.invoke()
if b20_2var.get()>0:
b20_2.invoke()
if b20_3var.get()>0:
b20_3.invoke()
if b20_4var.get()>0:
b20_4.invoke()
if b20_5var.get()>0:
b20_5.invoke()
if b20_7var.get()>0:
b20_7.invoke()
if b21_0var.get()>0:
b21_0.invoke()
if b21_1var.get()>0:
b21_1.invoke()
if b21_2var.get()>0:
b21_2.invoke()
if b21_3var.get()>0:
b21_3.invoke()
if b21_4var.get()>0:
b21_4.invoke()
if b21_5var.get()>0:
b21_5.invoke()
if b21_7var.get()>0:
b21_7.invoke()
if b22_0var.get()>0:
b22_0.invoke()
if b22_1var.get()>0:
b22_1.invoke()
if b22_2var.get()>0:
b22_2.invoke()
if b22_3var.get()>0:
b22_3.invoke()
if b22_4var.get()>0:
b22_4.invoke()
if b22_5var.get()>0:
b22_5.invoke()
if b22_7var.get()>0:
b22_7.invoke()
if b23_0var.get()>0:
b23_0.invoke()
if b23_1var.get()>0:
b23_1.invoke()
if b23_2var.get()>0:
b23_2.invoke()
if b23_3var.get()>0:
b23_3.invoke()
if b23_4var.get()>0:
b23_4.invoke()
if b23_5var.get()>0:
b23_5.invoke()
if b23_7var.get()>0:
b23_7.invoke()
if b24_0var.get()>0:
b24_0.invoke()
if b24_1var.get()>0:
b24_1.invoke()
if b24_2var.get()>0:
b24_2.invoke()
if b24_3var.get()>0:
b24_3.invoke()
if b24_4var.get()>0:
b24_4.invoke()
if b24_5var.get()>0:
b24_5.invoke()
if b24_7var.get()>0:
b24_7.invoke()
if b25_0var.get()>0:
b25_0.invoke()
if b25_1var.get()>0:
b25_1.invoke()
if b25_2var.get()>0:
b25_2.invoke()
if b25_3var.get()>0:
b25_3.invoke()
if b25_4var.get()>0:
b25_4.invoke()
if b25_5var.get()>0:
b25_5.invoke()
if b25_7var.get()>0:
b25_7.invoke()
if b26_0var.get()>0:
b26_0.invoke()
if b26_1var.get()>0:
b26_1.invoke()
if b26_2var.get()>0:
b26_2.invoke()
if b26_3var.get()>0:
b26_3.invoke()
if b26_4var.get()>0:
b26_4.invoke()
if b26_5var.get()>0:
b26_5.invoke()
if b26_7var.get()>0:
b26_7.invoke()
if b27_0var.get()>0:
b27_0.invoke()
if b27_1var.get()>0:
b27_1.invoke()
if b27_2var.get()>0:
b27_2.invoke()
if b27_3var.get()>0:
b27_3.invoke()
if b27_4var.get()>0:
b27_4.invoke()
if b27_5var.get()>0:
b27_5.invoke()
if b27_7var.get()>0:
b27_7.invoke()
if b28_0var.get()>0:
b28_0.invoke()
if b28_1var.get()>0:
b28_1.invoke()
if b28_2var.get()>0:
b28_2.invoke()
if b28_3var.get()>0:
b28_3.invoke()
if b28_4var.get()>0:
b28_4.invoke()
if b28_5var.get()>0:
b28_5.invoke()
if b28_7var.get()>0:
b28_7.invoke()
if b29_0var.get()>0:
b29_0.invoke()
if b29_1var.get()>0:
b29_1.invoke()
if b29_2var.get()>0:
b29_2.invoke()
if b29_3var.get()>0:
b29_3.invoke()
if b29_4var.get()>0:
b29_4.invoke()
if b29_5var.get()>0:
b29_5.invoke()
if b29_7var.get()>0:
b29_7.invoke()
if b30_0var.get()>0:
b30_0.invoke()
if b30_1var.get()>0:
b30_1.invoke()
if b30_2var.get()>0:
b30_2.invoke()
if b30_3var.get()>0:
b30_3.invoke()
if b30_4var.get()>0:
b30_4.invoke()
if b30_5var.get()>0:
b30_5.invoke()
if b30_7var.get()>0:
b30_7.invoke()
if b31_0var.get()>0:
b31_0.invoke()
if b31_1var.get()>0:
b31_1.invoke()
if b31_2var.get()>0:
b31_2.invoke()
if b31_3var.get()>0:
b31_3.invoke()
if b31_4var.get()>0:
b31_4.invoke()
if b31_5var.get()>0:
b31_5.invoke()
if b31_7var.get()>0:
b31_7.invoke()
root = Tk()
content = ttk.Frame(root, padding=(24,3,12,12))
show_speed0 = StringVar()
show_speed0.set('0.5')
show_speed1 = StringVar()
show_speed1.set('0.5')
show_speed2 = StringVar()
show_speed2.set('0.5')
show_speed3 = StringVar()
show_speed3.set('0.5')
show_speed4 = StringVar()
show_speed4.set('0.5')
show_speed5 = StringVar()
show_speed5.set('0.5')
show_speed6 = StringVar()
show_speed6.set('0.5')
show_speed7 = StringVar()
show_speed7.set('0.5')
show_speed8 = StringVar()
show_speed8.set('0.5')
show_speed9 = StringVar()
show_speed9.set('0.5')
show_speed10 = StringVar()
show_speed10.set('0.5')
show_speed11 = StringVar()
show_speed11.set('0.5')
show_speed12 = StringVar()
show_speed12.set('0.5')
show_speed13 = StringVar()
show_speed13.set('0.5')
show_speed14 = StringVar()
show_speed14.set('0.5')
show_speed15 = StringVar()
show_speed15.set('0.5')
show_speed16 = StringVar()
show_speed16.set('0.5')
show_speed17 = StringVar()
show_speed17.set('0.5')
show_speed18 = StringVar()
show_speed18.set('0.5')
show_speed19 = StringVar()
show_speed19.set('0.5')
show_speed20 = StringVar()
show_speed20.set('0.5')
show_speed21 = StringVar()
show_speed21.set('0.5')
show_speed22 = StringVar()
show_speed22.set('0.5')
show_speed23 = StringVar()
show_speed23.set('0.5')
show_speed24 = StringVar()
show_speed24.set('0.5')
show_speed25 = StringVar()
show_speed25.set('0.5')
show_speed26 = StringVar()
show_speed26.set('0.5')
show_speed27 = StringVar()
show_speed27.set('0.5')
show_speed28 = StringVar()
show_speed28.set('0.5')
show_speed29 = StringVar()
show_speed29.set('0.5')
show_speed30 = StringVar()
show_speed30.set('0.5')
show_speed31 = StringVar()
show_speed31.set('0.5')
show_repeat = StringVar()
show_repeat.set('0.5')
show_loop = StringVar()
show_loop.set('1')
global c1
c1 = StringVar()
stop_var = IntVar()
stop_var.set(0)
stop_0 = ttk.Checkbutton(content, text="STOP", variable=stop_var, onvalue=1, offvalue=0)
loop_var = IntVar()
loop_var.set(0)
loop_0 = ttk.Checkbutton(content, command=toggle_inf, text="LOOP OFF/ON", variable=loop_var, onvalue=1, offvalue=0)
loop_0.grid(column=26,row=29)
nameb0_0 = ttk.Label(content, text="Note 1", background=c1.get())
nameb1_0 = ttk.Label(content, text="Note 2", background=c1.get())
nameb2_0 = ttk.Label(content, text="Note 3", background=c1.get())
nameb3_0 = ttk.Label(content, text="Note 4", background=c1.get())
b0_0var = IntVar()
b0_1var = IntVar()
b0_2var = IntVar()
b0_3var = IntVar()
b0_4var = IntVar()
b0_5var = IntVar()
b0_6var = IntVar()
b0_7var = IntVar()
b1_0var = IntVar()
b1_1var = IntVar()
b1_2var = IntVar()
b1_3var = IntVar()
b1_4var = IntVar()
b1_5var = IntVar()
b1_7var = IntVar()
b2_0var = IntVar()
b2_1var = IntVar()
b2_2var = IntVar()
b2_3var = IntVar()
b2_4var = IntVar()
b2_5var = IntVar()
b2_7var = IntVar()
b3_0var = IntVar()
b3_1var = IntVar()
b3_2var = IntVar()
b3_3var = IntVar()
b3_4var = IntVar()
b3_5var = IntVar()
b3_7var = IntVar()
b0_0var.set(0)
b0_1var.set(0)
b0_2var.set(0)
b0_3var.set(0)
b0_4var.set(0)
b0_5var.set(0)
b0_6var.set(0)
b0_7var.set(0)
b1_0var.set(0)
b1_1var.set(0)
b1_2var.set(0)
b1_3var.set(0)
b1_4var.set(0)
b1_5var.set(0)
b1_7var.set(0)
b2_0var.set(0)
b2_1var.set(0)
b2_2var.set(0)
b2_3var.set(0)
b2_4var.set(0)
b2_5var.set(0)
b2_7var.set(0)
b3_0var.set(0)
b3_1var.set(0)
b3_2var.set(0)
b3_3var.set(0)
b3_4var.set(0)
b3_5var.set(0)
b3_7var.set(0)
b0_0 = ttk.Checkbutton(content, text="1", variable=b0_0var, onvalue=1, offvalue=0)
b0_1 = ttk.Checkbutton(content, text="2", variable=b0_1var, onvalue=1, offvalue=0)
b0_2 = ttk.Checkbutton(content, text="4", variable=b0_2var, onvalue=1, offvalue=0)
b0_3 = ttk.Checkbutton(content, text="8", variable=b0_3var, onvalue=1, offvalue=0)
b0_4 = ttk.Checkbutton(content, text="16", variable=b0_4var, onvalue=1, offvalue=0)
b0_5 = ttk.Checkbutton(content, text="32", variable=b0_5var, onvalue=1, offvalue=0)
b0_6 = ttk.Checkbutton(content, command=toggle_loop, text="INFINITE LOOP OFF/ON", variable=b0_6var, onvalue=1, offvalue=0)
b0_7 = ttk.Checkbutton(content, text="HALT", variable=b0_7var, onvalue=1, offvalue=0)
b1_0 = ttk.Checkbutton(content, text="1", variable=b1_0var, onvalue=1, offvalue=0)
b1_1 = ttk.Checkbutton(content, text="2", variable=b1_1var, onvalue=1, offvalue=0)
b1_2 = ttk.Checkbutton(content, text="4", variable=b1_2var, onvalue=1, offvalue=0)
b1_3 = ttk.Checkbutton(content, text="8", variable=b1_3var, onvalue=1, offvalue=0)
b1_4 = ttk.Checkbutton(content, text="16", variable=b1_4var, onvalue=1, offvalue=0)
b1_5 = ttk.Checkbutton(content, text="32", variable=b1_5var, onvalue=1, offvalue=0)
b1_7 = ttk.Checkbutton(content, text="HALT", variable=b1_7var, onvalue=1, offvalue=0)
b2_0 = ttk.Checkbutton(content, text="1", variable=b2_0var, onvalue=1, offvalue=0)
b2_1 = ttk.Checkbutton(content, text="2", variable=b2_1var, onvalue=1, offvalue=0)
b2_2 = ttk.Checkbutton(content, text="4", variable=b2_2var, onvalue=1, offvalue=0)
b2_3 = ttk.Checkbutton(content, text="8", variable=b2_3var, onvalue=1, offvalue=0)
b2_4 = ttk.Checkbutton(content, text="16", variable=b2_4var, onvalue=1, offvalue=0)
b2_5 = ttk.Checkbutton(content, text="32", variable=b2_5var, onvalue=1, offvalue=0)
b2_7 = ttk.Checkbutton(content, text="HALT", variable=b2_7var, onvalue=1, offvalue=0)
b3_0 = ttk.Checkbutton(content, text="1", variable=b3_0var, onvalue=1, offvalue=0)
b3_1 = ttk.Checkbutton(content, text="2", variable=b3_1var, onvalue=1, offvalue=0)
b3_2 = ttk.Checkbutton(content, text="4", variable=b3_2var, onvalue=1, offvalue=0)
b3_3 = ttk.Checkbutton(content, text="8", variable=b3_3var, onvalue=1, offvalue=0)
b3_4 = ttk.Checkbutton(content, text="16", variable=b3_4var, onvalue=1, offvalue=0)
b3_5 = ttk.Checkbutton(content, text="32", variable=b3_5var, onvalue=1, offvalue=0)
b3_7 = ttk.Checkbutton(content, text="HALT", variable=b3_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb0_0.grid(column=4, row=0, columnspan=2)
nameb1_0.grid(column=4, row=5, columnspan=2)
nameb2_0.grid(column=4, row=11, columnspan=2)
nameb3_0.grid(column=4, row=17, columnspan=2)
space0 = ttk.Label(content, width=6, text=" ")
space0.grid(column=12, row=0, columnspan=1)
b0_0.grid(column=1,row=3)
b0_1.grid(column=2,row=3)
b0_2.grid(column=3,row=3)
b0_3.grid(column=4,row=3)
b0_4.grid(column=5,row=3)
b0_5.grid(column=6,row=3, ipadx=10)
b0_6.grid(column=26,row=24)
b0_7.grid(column=8,row=3, ipadx=10)
b1_0.grid(column=1,row=6)
b1_1.grid(column=2,row=6)
b1_2.grid(column=3,row=6)
b1_3.grid(column=4,row=6)
b1_4.grid(column=5,row=6)
b1_5.grid(column=6,row=6, ipadx=10)
b1_7.grid(column=8,row=6, ipadx=10)
b2_0.grid(column=1,row=12)
b2_1.grid(column=2,row=12)
b2_2.grid(column=3,row=12)
b2_3.grid(column=4,row=12)
b2_4.grid(column=5,row=12)
b2_5.grid(column=6,row=12, ipadx=10)
b2_7.grid(column=8,row=12, ipadx=10)
b3_0.grid(column=1,row=18)
b3_1.grid(column=2,row=18)
b3_2.grid(column=3,row=18)
b3_3.grid(column=4,row=18)
b3_4.grid(column=5,row=18)
b3_5.grid(column=6,row=18, ipadx=10)
b3_7.grid(column=8,row=18, ipadx=10)
nameb4_0 = ttk.Label(content, text="Note 5", background=c1.get())
nameb5_0 = ttk.Label(content, text="Note 6", background=c1.get())
nameb6_0 = ttk.Label(content, text="Note 7", background=c1.get())
nameb7_0 = ttk.Label(content, text="Note 8", background=c1.get())
b4_0var = IntVar()
b4_1var = IntVar()
b4_2var = IntVar()
b4_3var = IntVar()
b4_4var = IntVar()
b4_5var = IntVar()
b4_7var = IntVar()
b5_0var = IntVar()
b5_1var = IntVar()
b5_2var = IntVar()
b5_3var = IntVar()
b5_4var = IntVar()
b5_5var = IntVar()
b5_7var = IntVar()
b6_0var = IntVar()
b6_1var = IntVar()
b6_2var = IntVar()
b6_3var = IntVar()
b6_4var = IntVar()
b6_5var = IntVar()
b6_7var = IntVar()
b7_0var = IntVar()
b7_1var = IntVar()
b7_2var = IntVar()
b7_3var = IntVar()
b7_4var = IntVar()
b7_5var = IntVar()
b7_7var = IntVar()
b4_0var.set(0)
b4_1var.set(0)
b4_2var.set(0)
b4_3var.set(0)
b4_4var.set(0)
b4_5var.set(0)
b4_7var.set(0)
b5_0var.set(0)
b5_1var.set(0)
b5_2var.set(0)
b5_3var.set(0)
b5_4var.set(0)
b5_5var.set(0)
b5_7var.set(0)
b6_0var.set(0)
b6_1var.set(0)
b6_2var.set(0)
b6_3var.set(0)
b6_4var.set(0)
b6_5var.set(0)
b6_7var.set(0)
b7_0var.set(0)
b7_1var.set(0)
b7_2var.set(0)
b7_3var.set(0)
b7_4var.set(0)
b7_5var.set(0)
b7_7var.set(0)
b4_0 = ttk.Checkbutton(content, text="1", variable=b4_0var, onvalue=1, offvalue=0)
b4_1 = ttk.Checkbutton(content, text="2", variable=b4_1var, onvalue=1, offvalue=0)
b4_2 = ttk.Checkbutton(content, text="4", variable=b4_2var, onvalue=1, offvalue=0)
b4_3 = ttk.Checkbutton(content, text="8", variable=b4_3var, onvalue=1, offvalue=0)
b4_4 = ttk.Checkbutton(content, text="16", variable=b4_4var, onvalue=1, offvalue=0)
b4_5 = ttk.Checkbutton(content, text="32", variable=b4_5var, onvalue=1, offvalue=0)
b4_7 = ttk.Checkbutton(content, text="HALT", variable=b4_7var, onvalue=1, offvalue=0)
b5_0 = ttk.Checkbutton(content, text="1", variable=b5_0var, onvalue=1, offvalue=0)
b5_1 = ttk.Checkbutton(content, text="2", variable=b5_1var, onvalue=1, offvalue=0)
b5_2 = ttk.Checkbutton(content, text="4", variable=b5_2var, onvalue=1, offvalue=0)
b5_3 = ttk.Checkbutton(content, text="8", variable=b5_3var, onvalue=1, offvalue=0)
b5_4 = ttk.Checkbutton(content, text="16", variable=b5_4var, onvalue=1, offvalue=0)
b5_5 = ttk.Checkbutton(content, text="32", variable=b5_5var, onvalue=1, offvalue=0)
b5_7 = ttk.Checkbutton(content, text="HALT", variable=b5_7var, onvalue=1, offvalue=0)
b6_0 = ttk.Checkbutton(content, text="1", variable=b6_0var, onvalue=1, offvalue=0)
b6_1 = ttk.Checkbutton(content, text="2", variable=b6_1var, onvalue=1, offvalue=0)
b6_2 = ttk.Checkbutton(content, text="4", variable=b6_2var, onvalue=1, offvalue=0)
b6_3 = ttk.Checkbutton(content, text="8", variable=b6_3var, onvalue=1, offvalue=0)
b6_4 = ttk.Checkbutton(content, text="16", variable=b6_4var, onvalue=1, offvalue=0)
b6_5 = ttk.Checkbutton(content, text="32", variable=b6_5var, onvalue=1, offvalue=0)
b6_7 = ttk.Checkbutton(content, text="HALT", variable=b6_7var, onvalue=1, offvalue=0)
b7_0 = ttk.Checkbutton(content, text="1", variable=b7_0var, onvalue=1, offvalue=0)
b7_1 = ttk.Checkbutton(content, text="2", variable=b7_1var, onvalue=1, offvalue=0)
b7_2 = ttk.Checkbutton(content, text="4", variable=b7_2var, onvalue=1, offvalue=0)
b7_3 = ttk.Checkbutton(content, text="8", variable=b7_3var, onvalue=1, offvalue=0)
b7_4 = ttk.Checkbutton(content, text="16", variable=b7_4var, onvalue=1, offvalue=0)
b7_5 = ttk.Checkbutton(content, text="32", variable=b7_5var, onvalue=1, offvalue=0)
b7_7 = ttk.Checkbutton(content, text="HALT", variable=b7_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb4_0.grid(column=4, row=23, columnspan=2)
nameb5_0.grid(column=4, row=29, columnspan=2)
nameb6_0.grid(column=4, row=35, columnspan=2)
nameb7_0.grid(column=4, row=41, columnspan=2)
b4_0.grid(column=1,row=24)
b4_1.grid(column=2,row=24)
b4_2.grid(column=3,row=24)
b4_3.grid(column=4,row=24)
b4_4.grid(column=5,row=24)
b4_5.grid(column=6,row=24, ipadx=10)
b4_7.grid(column=8,row=24, ipadx=10)
b5_0.grid(column=1,row=30)
b5_1.grid(column=2,row=30)
b5_2.grid(column=3,row=30)
b5_3.grid(column=4,row=30)
b5_4.grid(column=5,row=30)
b5_5.grid(column=6,row=30, ipadx=10)
b5_7.grid(column=8,row=30, ipadx=10)
b6_0.grid(column=1,row=36)
b6_1.grid(column=2,row=36)
b6_2.grid(column=3,row=36)
b6_3.grid(column=4,row=36)
b6_4.grid(column=5,row=36)
b6_5.grid(column=6,row=36, ipadx=10)
b6_7.grid(column=8,row=36, ipadx=10)
b7_0.grid(column=1,row=42)
b7_1.grid(column=2,row=42)
b7_2.grid(column=3,row=42)
b7_3.grid(column=4,row=42)
b7_4.grid(column=5,row=42)
b7_5.grid(column=6,row=42, ipadx=10)
b7_7.grid(column=8,row=42, ipadx=10)
nameb8_0 = ttk.Label(content, text="Note 9", background=c1.get())
nameb9_0 = ttk.Label(content, text="Note 10", background=c1.get())
nameb10_0 = ttk.Label(content, text="Note 11", background=c1.get())
nameb11_0 = ttk.Label(content, text="Note 12", background=c1.get())
b8_0var = IntVar()
b8_1var = IntVar()
b8_2var = IntVar()
b8_3var = IntVar()
b8_4var = IntVar()
b8_5var = IntVar()
b8_7var = IntVar()
b9_0var = IntVar()
b9_1var = IntVar()
b9_2var = IntVar()
b9_3var = IntVar()
b9_4var = IntVar()
b9_5var = IntVar()
b9_7var = IntVar()
b10_0var = IntVar()
b10_1var = IntVar()
b10_2var = IntVar()
b10_3var = IntVar()
b10_4var = IntVar()
b10_5var = IntVar()
b10_7var = IntVar()
b11_0var = IntVar()
b11_1var = IntVar()
b11_2var = IntVar()
b11_3var = IntVar()
b11_4var = IntVar()
b11_5var = IntVar()
b11_7var = IntVar()
b8_0var.set(0)
b8_1var.set(0)
b8_2var.set(0)
b8_3var.set(0)
b8_4var.set(0)
b8_5var.set(0)
b8_7var.set(0)
b9_0var.set(0)
b9_1var.set(0)
b9_2var.set(0)
b9_3var.set(0)
b9_4var.set(0)
b9_5var.set(0)
b9_7var.set(0)
b10_0var.set(0)
b10_1var.set(0)
b10_2var.set(0)
b10_3var.set(0)
b10_4var.set(0)
b10_5var.set(0)
b10_7var.set(0)
b11_0var.set(0)
b11_1var.set(0)
b11_2var.set(0)
b11_3var.set(0)
b11_4var.set(0)
b11_5var.set(0)
b11_7var.set(0)
b8_0 = ttk.Checkbutton(content, text="1", variable=b8_0var, onvalue=1, offvalue=0)
b8_1 = ttk.Checkbutton(content, text="2", variable=b8_1var, onvalue=1, offvalue=0)
b8_2 = ttk.Checkbutton(content, text="4", variable=b8_2var, onvalue=1, offvalue=0)
b8_3 = ttk.Checkbutton(content, text="8", variable=b8_3var, onvalue=1, offvalue=0)
b8_4 = ttk.Checkbutton(content, text="16", variable=b8_4var, onvalue=1, offvalue=0)
b8_5 = ttk.Checkbutton(content, text="32", variable=b8_5var, onvalue=1, offvalue=0)
b8_7 = ttk.Checkbutton(content, text="HALT", variable=b8_7var, onvalue=1, offvalue=0)
b9_0 = ttk.Checkbutton(content, text="1", variable=b9_0var, onvalue=1, offvalue=0)
b9_1 = ttk.Checkbutton(content, text="2", variable=b9_1var, onvalue=1, offvalue=0)
b9_2 = ttk.Checkbutton(content, text="4", variable=b9_2var, onvalue=1, offvalue=0)
b9_3 = ttk.Checkbutton(content, text="8", variable=b9_3var, onvalue=1, offvalue=0)
b9_4 = ttk.Checkbutton(content, text="16", variable=b9_4var, onvalue=1, offvalue=0)
b9_5 = ttk.Checkbutton(content, text="32", variable=b9_5var, onvalue=1, offvalue=0)
b9_7 = ttk.Checkbutton(content, text="HALT", variable=b9_7var, onvalue=1, offvalue=0)
b10_0 = ttk.Checkbutton(content, text="1", variable=b10_0var, onvalue=1, offvalue=0)
b10_1 = ttk.Checkbutton(content, text="2", variable=b10_1var, onvalue=1, offvalue=0)
b10_2 = ttk.Checkbutton(content, text="4", variable=b10_2var, onvalue=1, offvalue=0)
b10_3 = ttk.Checkbutton(content, text="8", variable=b10_3var, onvalue=1, offvalue=0)
b10_4 = ttk.Checkbutton(content, text="16", variable=b10_4var, onvalue=1, offvalue=0)
b10_5 = ttk.Checkbutton(content, text="32", variable=b10_5var, onvalue=1, offvalue=0)
b10_7 = ttk.Checkbutton(content, text="HALT", variable=b10_7var, onvalue=1, offvalue=0)
b11_0 = ttk.Checkbutton(content, text="1", variable=b11_0var, onvalue=1, offvalue=0)
b11_1 = ttk.Checkbutton(content, text="2", variable=b11_1var, onvalue=1, offvalue=0)
b11_2 = ttk.Checkbutton(content, text="4", variable=b11_2var, onvalue=1, offvalue=0)
b11_3 = ttk.Checkbutton(content, text="8", variable=b11_3var, onvalue=1, offvalue=0)
b11_4 = ttk.Checkbutton(content, text="16", variable=b11_4var, onvalue=1, offvalue=0)
b11_5 = ttk.Checkbutton(content, text="32", variable=b11_5var, onvalue=1, offvalue=0)
b11_7 = ttk.Checkbutton(content, text="HALT", variable=b11_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb8_0.grid(column=4, row=47, columnspan=2)
nameb9_0.grid(column=4, row=53, columnspan=2)
nameb10_0.grid(column=4, row=59, columnspan=2)
nameb11_0.grid(column=4, row=65, columnspan=2)
b8_0.grid(column=1,row=48)
b8_1.grid(column=2,row=48)
b8_2.grid(column=3,row=48)
b8_3.grid(column=4,row=48)
b8_4.grid(column=5,row=48)
b8_5.grid(column=6,row=48, ipadx=10)
b8_7.grid(column=8,row=48, ipadx=10)
b9_0.grid(column=1,row=54)
b9_1.grid(column=2,row=54)
b9_2.grid(column=3,row=54)
b9_3.grid(column=4,row=54)
b9_4.grid(column=5,row=54)
b9_5.grid(column=6,row=54, ipadx=10)
b9_7.grid(column=8,row=54, ipadx=10)
b10_0.grid(column=1,row=60)
b10_1.grid(column=2,row=60)
b10_2.grid(column=3,row=60)
b10_3.grid(column=4,row=60)
b10_4.grid(column=5,row=60)
b10_5.grid(column=6,row=60, ipadx=10)
b10_7.grid(column=8,row=60, ipadx=10)
b11_0.grid(column=1,row=66)
b11_1.grid(column=2,row=66)
b11_2.grid(column=3,row=66)
b11_3.grid(column=4,row=66)
b11_4.grid(column=5,row=66)
b11_5.grid(column=6,row=66, ipadx=10)
b11_7.grid(column=8,row=66, ipadx=10)
nameb12_0 = ttk.Label(content, text="Note 13", background=c1.get())
nameb13_0 = ttk.Label(content, text="Note 14", background=c1.get())
nameb14_0 = ttk.Label(content, text="Note 15", background=c1.get())
nameb15_0 = ttk.Label(content, text="Note 16", background=c1.get())
b12_0var = IntVar()
b12_1var = IntVar()
b12_2var = IntVar()
b12_3var = IntVar()
b12_4var = IntVar()
b12_5var = IntVar()
b12_7var = IntVar()
b13_0var = IntVar()
b13_1var = IntVar()
b13_2var = IntVar()
b13_3var = IntVar()
b13_4var = IntVar()
b13_5var = IntVar()
b13_7var = IntVar()
b14_0var = IntVar()
b14_1var = IntVar()
b14_2var = IntVar()
b14_3var = IntVar()
b14_4var = IntVar()
b14_5var = IntVar()
b14_7var = IntVar()
b15_0var = IntVar()
b15_1var = IntVar()
b15_2var = IntVar()
b15_3var = IntVar()
b15_4var = IntVar()
b15_5var = IntVar()
b15_7var = IntVar()
b12_0var.set(0)
b12_1var.set(0)
b12_2var.set(0)
b12_3var.set(0)
b12_4var.set(0)
b12_5var.set(0)
b12_7var.set(0)
b13_0var.set(0)
b13_1var.set(0)
b13_2var.set(0)
b13_3var.set(0)
b13_4var.set(0)
b13_5var.set(0)
b13_7var.set(0)
b14_0var.set(0)
b14_1var.set(0)
b14_2var.set(0)
b14_3var.set(0)
b14_4var.set(0)
b14_5var.set(0)
b14_7var.set(0)
b15_0var.set(0)
b15_1var.set(0)
b15_2var.set(0)
b15_3var.set(0)
b15_4var.set(0)
b15_5var.set(0)
b15_7var.set(0)
b12_0 = ttk.Checkbutton(content, text="1", variable=b12_0var, onvalue=1, offvalue=0)
b12_1 = ttk.Checkbutton(content, text="2", variable=b12_1var, onvalue=1, offvalue=0)
b12_2 = ttk.Checkbutton(content, text="4", variable=b12_2var, onvalue=1, offvalue=0)
b12_3 = ttk.Checkbutton(content, text="8", variable=b12_3var, onvalue=1, offvalue=0)
b12_4 = ttk.Checkbutton(content, text="16", variable=b12_4var, onvalue=1, offvalue=0)
b12_5 = ttk.Checkbutton(content, text="32", variable=b12_5var, onvalue=1, offvalue=0)
b12_7 = ttk.Checkbutton(content, text="HALT", variable=b12_7var, onvalue=1, offvalue=0)
b13_0 = ttk.Checkbutton(content, text="1", variable=b13_0var, onvalue=1, offvalue=0)
b13_1 = ttk.Checkbutton(content, text="2", variable=b13_1var, onvalue=1, offvalue=0)
b13_2 = ttk.Checkbutton(content, text="4", variable=b13_2var, onvalue=1, offvalue=0)
b13_3 = ttk.Checkbutton(content, text="8", variable=b13_3var, onvalue=1, offvalue=0)
b13_4 = ttk.Checkbutton(content, text="16", variable=b13_4var, onvalue=1, offvalue=0)
b13_5 = ttk.Checkbutton(content, text="32", variable=b13_5var, onvalue=1, offvalue=0)
b13_7 = ttk.Checkbutton(content, text="HALT", variable=b13_7var, onvalue=1, offvalue=0)
b14_0 = ttk.Checkbutton(content, text="1", variable=b14_0var, onvalue=1, offvalue=0)
b14_1 = ttk.Checkbutton(content, text="2", variable=b14_1var, onvalue=1, offvalue=0)
b14_2 = ttk.Checkbutton(content, text="4", variable=b14_2var, onvalue=1, offvalue=0)
b14_3 = ttk.Checkbutton(content, text="8", variable=b14_3var, onvalue=1, offvalue=0)
b14_4 = ttk.Checkbutton(content, text="16", variable=b14_4var, onvalue=1, offvalue=0)
b14_5 = ttk.Checkbutton(content, text="32", variable=b14_5var, onvalue=1, offvalue=0)
b14_7 = ttk.Checkbutton(content, text="HALT", variable=b14_7var, onvalue=1, offvalue=0)
b15_0 = ttk.Checkbutton(content, text="1", variable=b15_0var, onvalue=1, offvalue=0)
b15_1 = ttk.Checkbutton(content, text="2", variable=b15_1var, onvalue=1, offvalue=0)
b15_2 = ttk.Checkbutton(content, text="4", variable=b15_2var, onvalue=1, offvalue=0)
b15_3 = ttk.Checkbutton(content, text="8", variable=b15_3var, onvalue=1, offvalue=0)
b15_4 = ttk.Checkbutton(content, text="16", variable=b15_4var, onvalue=1, offvalue=0)
b15_5 = ttk.Checkbutton(content, text="32", variable=b15_5var, onvalue=1, offvalue=0)
b15_7 = ttk.Checkbutton(content, text="HALT", variable=b15_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb12_0.grid(column=4, row=71, columnspan=2)
nameb13_0.grid(column=4, row=77, columnspan=2)
nameb14_0.grid(column=4, row=83, columnspan=2)
nameb15_0.grid(column=4, row=89, columnspan=2)
space0 = ttk.Label(content, width=6, text=" ")
space0.grid(column=25, row=0, columnspan=1)
b12_0.grid(column=1,row=72)
b12_1.grid(column=2,row=72)
b12_2.grid(column=3,row=72)
b12_3.grid(column=4,row=72)
b12_4.grid(column=5,row=72)
b12_5.grid(column=6,row=72, ipadx=10)
b12_7.grid(column=8,row=72, ipadx=10)
b13_0.grid(column=1,row=78)
b13_1.grid(column=2,row=78)
b13_2.grid(column=3,row=78)
b13_3.grid(column=4,row=78)
b13_4.grid(column=5,row=78)
b13_5.grid(column=6,row=78, ipadx=10)
b13_7.grid(column=8,row=78, ipadx=10)
b14_0.grid(column=1,row=84)
b14_1.grid(column=2,row=84)
b14_2.grid(column=3,row=84)
b14_3.grid(column=4,row=84)
b14_4.grid(column=5,row=84)
b14_5.grid(column=6,row=84, ipadx=10)
b14_7.grid(column=8,row=84, ipadx=10)
b15_0.grid(column=1,row=90)
b15_1.grid(column=2,row=90)
b15_2.grid(column=3,row=90)
b15_3.grid(column=4,row=90)
b15_4.grid(column=5,row=90)
b15_5.grid(column=6,row=90, ipadx=10)
b15_7.grid(column=8,row=90, ipadx=10)
nameb16_0 = ttk.Label(content, text="Note 17", background=c1.get())
nameb17_0 = ttk.Label(content, text="Note 18", background=c1.get())
nameb18_0 = ttk.Label(content, text="Note 19", background=c1.get())
nameb19_0 = ttk.Label(content, text="Note 20", background=c1.get())
b16_0var = IntVar()
b16_1var = IntVar()
b16_2var = IntVar()
b16_3var = IntVar()
b16_4var = IntVar()
b16_5var = IntVar()
b16_7var = IntVar()
b17_0var = IntVar()
b17_1var = IntVar()
b17_2var = IntVar()
b17_3var = IntVar()
b17_4var = IntVar()
b17_5var = IntVar()
b17_7var = IntVar()
b18_0var = IntVar()
b18_1var = IntVar()
b18_2var = IntVar()
b18_3var = IntVar()
b18_4var = IntVar()
b18_5var = IntVar()
b18_7var = IntVar()
b19_0var = IntVar()
b19_1var = IntVar()
b19_2var = IntVar()
b19_3var = IntVar()
b19_4var = IntVar()
b19_5var = IntVar()
b19_7var = IntVar()
b16_0var.set(0)
b16_1var.set(0)
b16_2var.set(0)
b16_3var.set(0)
b16_4var.set(0)
b16_5var.set(0)
b16_7var.set(0)
b17_0var.set(0)
b17_1var.set(0)
b17_2var.set(0)
b17_3var.set(0)
b17_4var.set(0)
b17_5var.set(0)
b17_7var.set(0)
b18_0var.set(0)
b18_1var.set(0)
b18_2var.set(0)
b18_3var.set(0)
b18_4var.set(0)
b18_5var.set(0)
b18_7var.set(0)
b19_0var.set(0)
b19_1var.set(0)
b19_2var.set(0)
b19_3var.set(0)
b19_4var.set(0)
b19_5var.set(0)
b19_7var.set(0)
b16_0 = ttk.Checkbutton(content, text="1", variable=b16_0var, onvalue=1, offvalue=0)
b16_1 = ttk.Checkbutton(content, text="2", variable=b16_1var, onvalue=1, offvalue=0)
b16_2 = ttk.Checkbutton(content, text="4", variable=b16_2var, onvalue=1, offvalue=0)
b16_3 = ttk.Checkbutton(content, text="8", variable=b16_3var, onvalue=1, offvalue=0)
b16_4 = ttk.Checkbutton(content, text="16", variable=b16_4var, onvalue=1, offvalue=0)
b16_5 = ttk.Checkbutton(content, text="32", variable=b16_5var, onvalue=1, offvalue=0)
b16_7 = ttk.Checkbutton(content, text="HALT", variable=b16_7var, onvalue=1, offvalue=0)
b17_0 = ttk.Checkbutton(content, text="1", variable=b17_0var, onvalue=1, offvalue=0)
b17_1 = ttk.Checkbutton(content, text="2", variable=b17_1var, onvalue=1, offvalue=0)
b17_2 = ttk.Checkbutton(content, text="4", variable=b17_2var, onvalue=1, offvalue=0)
b17_3 = ttk.Checkbutton(content, text="8", variable=b17_3var, onvalue=1, offvalue=0)
b17_4 = ttk.Checkbutton(content, text="16", variable=b17_4var, onvalue=1, offvalue=0)
b17_5 = ttk.Checkbutton(content, text="32", variable=b17_5var, onvalue=1, offvalue=0)
b17_7 = ttk.Checkbutton(content, text="HALT", variable=b17_7var, onvalue=1, offvalue=0)
b18_0 = ttk.Checkbutton(content, text="1", variable=b18_0var, onvalue=1, offvalue=0)
b18_1 = ttk.Checkbutton(content, text="2", variable=b18_1var, onvalue=1, offvalue=0)
b18_2 = ttk.Checkbutton(content, text="4", variable=b18_2var, onvalue=1, offvalue=0)
b18_3 = ttk.Checkbutton(content, text="8", variable=b18_3var, onvalue=1, offvalue=0)
b18_4 = ttk.Checkbutton(content, text="16", variable=b18_4var, onvalue=1, offvalue=0)
b18_5 = ttk.Checkbutton(content, text="32", variable=b18_5var, onvalue=1, offvalue=0)
b18_7 = ttk.Checkbutton(content, text="HALT", variable=b18_7var, onvalue=1, offvalue=0)
b19_0 = ttk.Checkbutton(content, text="1", variable=b19_0var, onvalue=1, offvalue=0)
b19_1 = ttk.Checkbutton(content, text="2", variable=b19_1var, onvalue=1, offvalue=0)
b19_2 = ttk.Checkbutton(content, text="4", variable=b19_2var, onvalue=1, offvalue=0)
b19_3 = ttk.Checkbutton(content, text="8", variable=b19_3var, onvalue=1, offvalue=0)
b19_4 = ttk.Checkbutton(content, text="16", variable=b19_4var, onvalue=1, offvalue=0)
b19_5 = ttk.Checkbutton(content, text="32", variable=b19_5var, onvalue=1, offvalue=0)
b19_7 = ttk.Checkbutton(content, text="HALT", variable=b19_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb16_0.grid(column=16, row=0, columnspan=2)
nameb17_0.grid(column=16, row=5, columnspan=2)
nameb18_0.grid(column=16, row=11, columnspan=2)
nameb19_0.grid(column=16, row=17, columnspan=2)
b16_0.grid(column=13,row=3)
b16_1.grid(column=14,row=3)
b16_2.grid(column=15,row=3)
b16_3.grid(column=16,row=3)
b16_4.grid(column=17,row=3)
b16_5.grid(column=18,row=3, ipadx=10)
b16_7.grid(column=20,row=3, ipadx=10)
b17_0.grid(column=13,row=6)
b17_1.grid(column=14,row=6)
b17_2.grid(column=15,row=6)
b17_3.grid(column=16,row=6)
b17_4.grid(column=17,row=6)
b17_5.grid(column=18,row=6, ipadx=10)
b17_7.grid(column=20,row=6, ipadx=10)
b18_0.grid(column=13,row=12)
b18_1.grid(column=14,row=12)
b18_2.grid(column=15,row=12)
b18_3.grid(column=16,row=12)
b18_4.grid(column=17,row=12)
b18_5.grid(column=18,row=12, ipadx=10)
b18_7.grid(column=20,row=12, ipadx=10)
b19_0.grid(column=13,row=18)
b19_1.grid(column=14,row=18)
b19_2.grid(column=15,row=18)
b19_3.grid(column=16,row=18)
b19_4.grid(column=17,row=18)
b19_5.grid(column=18,row=18, ipadx=10)
b19_7.grid(column=20,row=18, ipadx=10)
nameb20_0 = ttk.Label(content, text="Note 21", background=c1.get())
nameb21_0 = ttk.Label(content, text="Note 22", background=c1.get())
nameb22_0 = ttk.Label(content, text="Note 23", background=c1.get())
nameb23_0 = ttk.Label(content, text="Note 24", background=c1.get())
b20_0var = IntVar()
b20_1var = IntVar()
b20_2var = IntVar()
b20_3var = IntVar()
b20_4var = IntVar()
b20_5var = IntVar()
b20_7var = IntVar()
b21_0var = IntVar()
b21_1var = IntVar()
b21_2var = IntVar()
b21_3var = IntVar()
b21_4var = IntVar()
b21_5var = IntVar()
b21_7var = IntVar()
b22_0var = IntVar()
b22_1var = IntVar()
b22_2var = IntVar()
b22_3var = IntVar()
b22_4var = IntVar()
b22_5var = IntVar()
b22_7var = IntVar()
b23_0var = IntVar()
b23_1var = IntVar()
b23_2var = IntVar()
b23_3var = IntVar()
b23_4var = IntVar()
b23_5var = IntVar()
b23_7var = IntVar()
b20_0var.set(0)
b20_1var.set(0)
b20_2var.set(0)
b20_3var.set(0)
b20_4var.set(0)
b20_5var.set(0)
b20_7var.set(0)
b21_0var.set(0)
b21_1var.set(0)
b21_2var.set(0)
b21_3var.set(0)
b21_4var.set(0)
b21_5var.set(0)
b21_7var.set(0)
b22_0var.set(0)
b22_1var.set(0)
b22_2var.set(0)
b22_3var.set(0)
b22_4var.set(0)
b22_5var.set(0)
b22_7var.set(0)
b23_0var.set(0)
b23_1var.set(0)
b23_2var.set(0)
b23_3var.set(0)
b23_4var.set(0)
b23_5var.set(0)
b23_7var.set(0)
b20_0 = ttk.Checkbutton(content, text="1", variable=b20_0var, onvalue=1, offvalue=0)
b20_1 = ttk.Checkbutton(content, text="2", variable=b20_1var, onvalue=1, offvalue=0)
b20_2 = ttk.Checkbutton(content, text="4", variable=b20_2var, onvalue=1, offvalue=0)
b20_3 = ttk.Checkbutton(content, text="8", variable=b20_3var, onvalue=1, offvalue=0)
b20_4 = ttk.Checkbutton(content, text="16", variable=b20_4var, onvalue=1, offvalue=0)
b20_5 = ttk.Checkbutton(content, text="32", variable=b20_5var, onvalue=1, offvalue=0)
b20_7 = ttk.Checkbutton(content, text="HALT", variable=b20_7var, onvalue=1, offvalue=0)
b21_0 = ttk.Checkbutton(content, text="1", variable=b21_0var, onvalue=1, offvalue=0)
b21_1 = ttk.Checkbutton(content, text="2", variable=b21_1var, onvalue=1, offvalue=0)
b21_2 = ttk.Checkbutton(content, text="4", variable=b21_2var, onvalue=1, offvalue=0)
b21_3 = ttk.Checkbutton(content, text="8", variable=b21_3var, onvalue=1, offvalue=0)
b21_4 = ttk.Checkbutton(content, text="16", variable=b21_4var, onvalue=1, offvalue=0)
b21_5 = ttk.Checkbutton(content, text="32", variable=b21_5var, onvalue=1, offvalue=0)
b21_7 = ttk.Checkbutton(content, text="HALT", variable=b21_7var, onvalue=1, offvalue=0)
b22_0 = ttk.Checkbutton(content, text="1", variable=b22_0var, onvalue=1, offvalue=0)
b22_1 = ttk.Checkbutton(content, text="2", variable=b22_1var, onvalue=1, offvalue=0)
b22_2 = ttk.Checkbutton(content, text="4", variable=b22_2var, onvalue=1, offvalue=0)
b22_3 = ttk.Checkbutton(content, text="8", variable=b22_3var, onvalue=1, offvalue=0)
b22_4 = ttk.Checkbutton(content, text="16", variable=b22_4var, onvalue=1, offvalue=0)
b22_5 = ttk.Checkbutton(content, text="32", variable=b22_5var, onvalue=1, offvalue=0)
b22_7 = ttk.Checkbutton(content, text="HALT", variable=b22_7var, onvalue=1, offvalue=0)
b23_0 = ttk.Checkbutton(content, text="1", variable=b23_0var, onvalue=1, offvalue=0)
b23_1 = ttk.Checkbutton(content, text="2", variable=b23_1var, onvalue=1, offvalue=0)
b23_2 = ttk.Checkbutton(content, text="4", variable=b23_2var, onvalue=1, offvalue=0)
b23_3 = ttk.Checkbutton(content, text="8", variable=b23_3var, onvalue=1, offvalue=0)
b23_4 = ttk.Checkbutton(content, text="16", variable=b23_4var, onvalue=1, offvalue=0)
b23_5 = ttk.Checkbutton(content, text="32", variable=b23_5var, onvalue=1, offvalue=0)
b23_7 = ttk.Checkbutton(content, text="HALT", variable=b23_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb20_0.grid(column=16, row=23, columnspan=2)
nameb21_0.grid(column=16, row=29, columnspan=2)
nameb22_0.grid(column=16, row=35, columnspan=2)
nameb23_0.grid(column=16, row=41, columnspan=2)
b20_0.grid(column=13,row=24)
b20_1.grid(column=14,row=24)
b20_2.grid(column=15,row=24)
b20_3.grid(column=16,row=24)
b20_4.grid(column=17,row=24)
b20_5.grid(column=18,row=24, ipadx=10)
b20_7.grid(column=20,row=24, ipadx=10)
b21_0.grid(column=13,row=30)
b21_1.grid(column=14,row=30)
b21_2.grid(column=15,row=30)
b21_3.grid(column=16,row=30)
b21_4.grid(column=17,row=30)
b21_5.grid(column=18,row=30, ipadx=10)
b21_7.grid(column=20,row=30, ipadx=10)
b22_0.grid(column=13,row=36)
b22_1.grid(column=14,row=36)
b22_2.grid(column=15,row=36)
b22_3.grid(column=16,row=36)
b22_4.grid(column=17,row=36)
b22_5.grid(column=18,row=36, ipadx=10)
b22_7.grid(column=20,row=36, ipadx=10)
b23_0.grid(column=13,row=42)
b23_1.grid(column=14,row=42)
b23_2.grid(column=15,row=42)
b23_3.grid(column=16,row=42)
b23_4.grid(column=17,row=42)
b23_5.grid(column=18,row=42, ipadx=10)
b23_7.grid(column=20,row=42, ipadx=10)
nameb24_0 = ttk.Label(content, text="Note 25", background=c1.get())
nameb25_0 = ttk.Label(content, text="Note 26", background=c1.get())
nameb26_0 = ttk.Label(content, text="Note 27", background=c1.get())
nameb27_0 = ttk.Label(content, text="Note 28", background=c1.get())
b24_0var = IntVar()
b24_1var = IntVar()
b24_2var = IntVar()
b24_3var = IntVar()
b24_4var = IntVar()
b24_5var = IntVar()
b24_7var = IntVar()
b25_0var = IntVar()
b25_1var = IntVar()
b25_2var = IntVar()
b25_3var = IntVar()
b25_4var = IntVar()
b25_5var = IntVar()
b25_7var = IntVar()
b26_0var = IntVar()
b26_1var = IntVar()
b26_2var = IntVar()
b26_3var = IntVar()
b26_4var = IntVar()
b26_5var = IntVar()
b26_7var = IntVar()
b27_0var = IntVar()
b27_1var = IntVar()
b27_2var = IntVar()
b27_3var = IntVar()
b27_4var = IntVar()
b27_5var = IntVar()
b27_7var = IntVar()
b24_0var.set(0)
b24_1var.set(0)
b24_2var.set(0)
b24_3var.set(0)
b24_4var.set(0)
b24_5var.set(0)
b24_7var.set(0)
b25_0var.set(0)
b25_1var.set(0)
b25_2var.set(0)
b25_3var.set(0)
b25_4var.set(0)
b25_5var.set(0)
b25_7var.set(0)
b26_0var.set(0)
b26_1var.set(0)
b26_2var.set(0)
b26_3var.set(0)
b26_4var.set(0)
b26_5var.set(0)
b26_7var.set(0)
b27_0var.set(0)
b27_1var.set(0)
b27_2var.set(0)
b27_3var.set(0)
b27_4var.set(0)
b27_5var.set(0)
b27_7var.set(0)
b24_0 = ttk.Checkbutton(content, text="1", variable=b24_0var, onvalue=1, offvalue=0)
b24_1 = ttk.Checkbutton(content, text="2", variable=b24_1var, onvalue=1, offvalue=0)
b24_2 = ttk.Checkbutton(content, text="4", variable=b24_2var, onvalue=1, offvalue=0)
b24_3 = ttk.Checkbutton(content, text="8", variable=b24_3var, onvalue=1, offvalue=0)
b24_4 = ttk.Checkbutton(content, text="16", variable=b24_4var, onvalue=1, offvalue=0)
b24_5 = ttk.Checkbutton(content, text="32", variable=b24_5var, onvalue=1, offvalue=0)
b24_7 = ttk.Checkbutton(content, text="HALT", variable=b24_7var, onvalue=1, offvalue=0)
b25_0 = ttk.Checkbutton(content, text="1", variable=b25_0var, onvalue=1, offvalue=0)
b25_1 = ttk.Checkbutton(content, text="2", variable=b25_1var, onvalue=1, offvalue=0)
b25_2 = ttk.Checkbutton(content, text="4", variable=b25_2var, onvalue=1, offvalue=0)
b25_3 = ttk.Checkbutton(content, text="8", variable=b25_3var, onvalue=1, offvalue=0)
b25_4 = ttk.Checkbutton(content, text="16", variable=b25_4var, onvalue=1, offvalue=0)
b25_5 = ttk.Checkbutton(content, text="32", variable=b25_5var, onvalue=1, offvalue=0)
b25_7 = ttk.Checkbutton(content, text="HALT", variable=b25_7var, onvalue=1, offvalue=0)
b26_0 = ttk.Checkbutton(content, text="1", variable=b26_0var, onvalue=1, offvalue=0)
b26_1 = ttk.Checkbutton(content, text="2", variable=b26_1var, onvalue=1, offvalue=0)
b26_2 = ttk.Checkbutton(content, text="4", variable=b26_2var, onvalue=1, offvalue=0)
b26_3 = ttk.Checkbutton(content, text="8", variable=b26_3var, onvalue=1, offvalue=0)
b26_4 = ttk.Checkbutton(content, text="16", variable=b26_4var, onvalue=1, offvalue=0)
b26_5 = ttk.Checkbutton(content, text="32", variable=b26_5var, onvalue=1, offvalue=0)
b26_7 = ttk.Checkbutton(content, text="HALT", variable=b26_7var, onvalue=1, offvalue=0)
b27_0 = ttk.Checkbutton(content, text="1", variable=b27_0var, onvalue=1, offvalue=0)
b27_1 = ttk.Checkbutton(content, text="2", variable=b27_1var, onvalue=1, offvalue=0)
b27_2 = ttk.Checkbutton(content, text="4", variable=b27_2var, onvalue=1, offvalue=0)
b27_3 = ttk.Checkbutton(content, text="8", variable=b27_3var, onvalue=1, offvalue=0)
b27_4 = ttk.Checkbutton(content, text="16", variable=b27_4var, onvalue=1, offvalue=0)
b27_5 = ttk.Checkbutton(content, text="32", variable=b27_5var, onvalue=1, offvalue=0)
b27_7 = ttk.Checkbutton(content, text="HALT", variable=b27_7var, onvalue=1, offvalue=0)
content.grid(column=0, row=0)
nameb24_0.grid(column=16, row=47, columnspan=2)
nameb25_0.grid(column=16, row=53, columnspan=2)
nameb26_0.grid(column=16, row=59, columnspan=2)
nameb27_0.grid(column=16, row=65, columnspan=2)
b24_0.grid(column=13,row=48)
b24_1.grid(column=14,row=48)
b24_2.grid(column=15,row=48)
b24_3.grid(column=16,row=48)
b24_4.grid(column=17,row=48)
b24_5.grid(column=18,row=48, ipadx=10)
b24_7.grid(column=20,row=48, ipadx=10)
b25_0.grid(column=13,row=54)
b25_1.grid(column=14,row=54)
b25_2.grid(column=15,row=54)
b25_3.grid(column=16,row=54)
b25_4.grid(column=17,row=54)
b25_5.grid(column=18,row=54, ipadx=10)
b25_7.grid(column=20,row=54, ipadx=10)
b26_0.grid(column=13,row=60)
b26_1.grid(column=14,row=60)
b26_2.grid(column=15,row=60)
b26_3.grid(column=16,row=60)
b26_4.grid(column=17,row=60)
b26_5.grid(column=18,row=60, ipadx=10)
b26_7.grid(column=20,row=60, ipadx=10)
b27_0.grid(column=13,row=66)
b27_1.grid(column=14,row=66)
b27_2.grid(column=15,row=66)
b27_3.grid(column=16,row=66)
b27_4.grid(column=17,row=66)
b27_5.grid(column=18,row=66, ipadx=10)
b27_7.grid(column=20,row=66, ipadx=10)
nameb28_0 = ttk.Label(content, text="Note 29", background=c1.get())
nameb29_0 = ttk.Label(content, text="Note 30", background=c1.get())
nameb30_0 = ttk.Label(content, text="Note 31", background=c1.get())
nameb31_0 = ttk.Label(content, text="Note 32", background=c1.get())
b28_0var = IntVar()
b28_1var = IntVar()
b28_2var = IntVar()
b28_3var = IntVar()
b28_4var = IntVar()
b28_5var = IntVar()
b28_7var = IntVar()
b29_0var = IntVar()
b29_1var = IntVar()
b29_2var = IntVar()
b29_3var = IntVar()
b29_4var = IntVar()
b29_5var = IntVar()
b29_7var = IntVar()
b30_0var = IntVar()
b30_1var = IntVar()
b30_2var = IntVar()
b30_3var = IntVar()
b30_4var = IntVar()
b30_5var = IntVar()
b30_7var = IntVar()
b31_0var = IntVar()
b31_1var = IntVar()
b31_2var = IntVar()
b31_3var = IntVar()
b31_4var = IntVar()
b31_5var = IntVar()
b31_7var = IntVar()
b28_0var.set(0)
b28_1var.set(0)
b28_2var.set(0)
b28_3var.set(0)
b28_4var.set(0)
b28_5var.set(0)
b28_7var.set(0)
b29_0var.set(0)
b29_1var.set(0)
b29_2var.set(0)
b29_3var.set(0)
b29_4var.set(0)
b29_5var.set(0)
b29_7var.set(0)
b30_0var.set(0)
b30_1var.set(0)
b30_2var.set(0)
b30_3var.set(0)
b30_4var.set(0)
b30_5var.set(0)
b30_7var.set(0)
b31_0var.set(0)
b31_1var.set(0)
b31_2var.set(0)
b31_3var.set(0)
b31_4var.set(0)
b31_5var.set(0)
b31_7var.set(0)
b28_0 = ttk.Checkbutton(content, text="1", variable=b28_0var, onvalue=1, offvalue=0)
b28_1 = ttk.Checkbutton(content, text="2", variable=b28_1var, onvalue=1, offvalue=0)
b28_2 = ttk.Checkbutton(content, text="4", variable=b28_2var, onvalue=1, offvalue=0)
b28_3 = ttk.Checkbutton(content, text="8", variable=b28_3var, onvalue=1, offvalue=0)
b28_4 = ttk.Checkbutton(content, text="16", variable=b28_4var, onvalue=1, offvalue=0)
b28_5 = ttk.Checkbutton(content, text="32", variable=b28_5var, onvalue=1, offvalue=0)
b28_7 = ttk.Checkbutton(content, text="HALT", variable=b28_7var, onvalue=1, offvalue=0)
b29_0 = ttk.Checkbutton(content, text="1", variable=b29_0var, onvalue=1, offvalue=0)
b29_1 = ttk.Checkbutton(content, text="2", variable=b29_1var, onvalue=1, offvalue=0)
b29_2 = ttk.Checkbutton(content, text="4", variable=b29_2var, onvalue=1, offvalue=0)
b29_3 = ttk.Checkbutton(content, text="8", variable=b29_3var, onvalue=1, offvalue=0)
b29_4 = ttk.Checkbutton(content, text="16", variable=b29_4var, onvalue=1, offvalue=0)
b29_5 = ttk.Checkbutton(content, text="32", variable=b29_5var, onvalue=1, offvalue=0)
b29_7 = ttk.Checkbutton(content, text="HALT", variable=b29_7var, onvalue=1, offvalue=0)
b30_0 = ttk.Checkbutton(content, text="1", variable=b30_0var, onvalue=1, offvalue=0)
b30_1 = ttk.Checkbutton(content, text="2", variable=b30_1var, onvalue=1, offvalue=0)
b30_2 = ttk.Checkbutton(content, text="4", variable=b30_2var, onvalue=1, offvalue=0)
b30_3 = ttk.Checkbutton(content, text="8", variable=b30_3var, onvalue=1, offvalue=0)
b30_4 = ttk.Checkbutton(content, text="16", variable=b30_4var, onvalue=1, offvalue=0)
b30_5 = ttk.Checkbutton(content, text="32", variable=b30_5var, onvalue=1, offvalue=0)
b30_7 = ttk.Checkbutton(content, text="HALT", variable=b30_7var, onvalue=1, offvalue=0)
b31_0 = ttk.Checkbutton(content, text="1", variable=b31_0var, onvalue=1, offvalue=0)
b31_1 = ttk.Checkbutton(content, text="2", variable=b31_1var, onvalue=1, offvalue=0)
b31_2 = ttk.Checkbutton(content, text="4", variable=b31_2var, onvalue=1, offvalue=0)
b31_3 = ttk.Checkbutton(content, text="8", variable=b31_3var, onvalue=1, offvalue=0)
b31_4 = ttk.Checkbutton(content, text="16", variable=b31_4var, onvalue=1, offvalue=0)
b31_5 = ttk.Checkbutton(content, text="32", variable=b31_5var, onvalue=1, offvalue=0)
b31_7 = ttk.Checkbutton(content, text="HALT", variable=b31_7var, onvalue=1, offvalue=0)
ttk.Style().configure('red.TButton', background='firebrick')
ttk.Style().configure('green.TButton', background='pale green')
ttk.Style().configure('orange.TButton', background='peru')
ttk.Style().configure('cream1.TButton', background='cornsilk3')
ttk.Style().configure('cream2.TButton', background='cornsilk2')
start = ttk.Button(content, command=start, text="START", style='green.TButton')
reset = ttk.Button(content, command=reset, text="RESET", style='orange.TButton')
stop = ttk.Button(content, command=stop, text="STOP", style='red.TButton')
repeatup = ttk.Button(content, command=repeatup, text="SHORTER",style='cream1.TButton' )
repeatdn = ttk.Button(content, command=repeatdn, text="LONGER",style='cream2.TButton' )
loopup = ttk.Button(content, command=loopup, text="MORE",style='cream1.TButton' )
loopdn = ttk.Button(content, command=loopdn, text="LESS",style='cream2.TButton' )
content.grid(column=0, row=0)
nameb28_0.grid(column=16, row=71, columnspan=2)
nameb29_0.grid(column=16, row=77, columnspan=2)
nameb30_0.grid(column=16, row=83, columnspan=2)
nameb31_0.grid(column=16, row=89, columnspan=2)
b28_0.grid(column=13,row=72)
b28_1.grid(column=14,row=72)
b28_2.grid(column=15,row=72)
b28_3.grid(column=16,row=72)
b28_4.grid(column=17,row=72)
b28_5.grid(column=18,row=72, ipadx=10)
b28_7.grid(column=20,row=72, ipadx=10)
b29_0.grid(column=13,row=78)
b29_1.grid(column=14,row=78)
b29_2.grid(column=15,row=78)
b29_3.grid(column=16,row=78)
b29_4.grid(column=17,row=78)
b29_5.grid(column=18,row=78, ipadx=10)
b29_7.grid(column=20,row=78, ipadx=10)
b30_0.grid(column=13,row=84)
b30_1.grid(column=14,row=84)
b30_2.grid(column=15,row=84)
b30_3.grid(column=16,row=84)
b30_4.grid(column=17,row=84)
b30_5.grid(column=18,row=84, ipadx=10)
b30_7.grid(column=20,row=84, ipadx=10)
b31_0.grid(column=13,row=90)
b31_1.grid(column=14,row=90)
b31_2.grid(column=15,row=90)
b31_3.grid(column=16,row=90)
b31_4.grid(column=17,row=90)
b31_5.grid(column=18,row=90, ipadx=10)
b31_7.grid(column=20,row=90, ipadx=10)
start.grid(column=26, row=3, columnspan=1)
reset.grid(column=26, row=6, columnspan=1)
stop.grid(column=26, row=12, columnspan=1)
repeatup.grid(column=26, row=54, columnspan=1)
repeatdn.grid(column=26, row=60, columnspan=1)
loopup.grid(column=26, row=36, columnspan=1)
loopdn.grid(column=26, row=42, columnspan=1)
f0 = ttk.Button(content, command=f0, text="F", width=1, style='cream1.TButton')
f1 = ttk.Button(content, command=f1, text="F", width=1, style='cream1.TButton')
f2 = ttk.Button(content, command=f2, text="F", width=1, style='cream1.TButton')
f3 = ttk.Button(content, command=f3, text="F", width=1, style='cream1.TButton')
f4 = ttk.Button(content, command=f4, text="F", width=1, style='cream1.TButton')
f5 = ttk.Button(content, command=f5, text="F", width=1, style='cream1.TButton')
f6 = ttk.Button(content, command=f6, text="F", width=1, style='cream1.TButton')
f7 = ttk.Button(content, command=f7, text="F", width=1, style='cream1.TButton')
f8 = ttk.Button(content, command=f8, text="F", width=1, style='cream1.TButton')
f9 = ttk.Button(content, command=f9, text="F", width=1, style='cream1.TButton')
f10 = ttk.Button(content, command=f10, text="F", width=1, style='cream1.TButton')
f11 = ttk.Button(content, command=f11, text="F", width=1, style='cream1.TButton')
f12 = ttk.Button(content, command=f12, text="F", width=1, style='cream1.TButton')
f13 = ttk.Button(content, command=f13, text="F", width=1, style='cream1.TButton')
f14 = ttk.Button(content, command=f14, text="F", width=1, style='cream1.TButton')
f15 = ttk.Button(content, command=f15, text="F", width=1, style='cream1.TButton')
f16 = ttk.Button(content, command=f16, text="F", width=1, style='cream1.TButton')
f17 = ttk.Button(content, command=f17, text="F", width=1, style='cream1.TButton')
f18 = ttk.Button(content, command=f18, text="F", width=1, style='cream1.TButton')
f19 = ttk.Button(content, command=f19, text="F", width=1, style='cream1.TButton')
f20 = ttk.Button(content, command=f20, text="F", width=1, style='cream1.TButton')
f21 = ttk.Button(content, command=f21, text="F", width=1, style='cream1.TButton')
f22 = ttk.Button(content, command=f22, text="F", width=1, style='cream1.TButton')
f23 = ttk.Button(content, command=f23, text="F", width=1, style='cream1.TButton')
f24 = ttk.Button(content, command=f24, text="F", width=1, style='cream1.TButton')
f25 = ttk.Button(content, command=f25, text="F", width=1, style='cream1.TButton')
f26 = ttk.Button(content, command=f26, text="F", width=1, style='cream1.TButton')
f27 = ttk.Button(content, command=f27, text="F", width=1, style='cream1.TButton')
f28 = ttk.Button(content, command=f28, text="F", width=1, style='cream1.TButton')
f29 = ttk.Button(content, command=f29, text="F", width=1, style='cream1.TButton')
f30 = ttk.Button(content, command=f30, text="F", width=1, style='cream1.TButton')
f31 = ttk.Button(content, command=f31, text="F", width=1, style='cream1.TButton')
f0.grid(column=11, row=3, columnspan=1)
f1.grid(column=11, row=6, columnspan=1)
f2.grid(column=11, row=12, columnspan=1)
f3.grid(column=11, row=18, columnspan=1)
f4.grid(column=11, row=24, columnspan=1)
f5.grid(column=11, row=30, columnspan=1)
f6.grid(column=11, row=36, columnspan=1)
f7.grid(column=11, row=42, columnspan=1)
f8.grid(column=11, row=48, columnspan=1)
f9.grid(column=11, row=54, columnspan=1)
f10.grid(column=11, row=60, columnspan=1)
f11.grid(column=11, row=66, columnspan=1)
f12.grid(column=11, row=72, columnspan=1)
f13.grid(column=11, row=78, columnspan=1)
f14.grid(column=11, row=84, columnspan=1)
f15.grid(column=11, row=90, columnspan=1)
f16.grid(column=23, row=3, columnspan=1)
f17.grid(column=23, row=6, columnspan=1)
f18.grid(column=23, row=12, columnspan=1)
f19.grid(column=23, row=18, columnspan=1)
f20.grid(column=23, row=24, columnspan=1)
f21.grid(column=23, row=30, columnspan=1)
f22.grid(column=23, row=36, columnspan=1)
f23.grid(column=23, row=42, columnspan=1)
f24.grid(column=23, row=48, columnspan=1)
f25.grid(column=23, row=54, columnspan=1)
f26.grid(column=23, row=60, columnspan=1)
f27.grid(column=23, row=66, columnspan=1)
f28.grid(column=23, row=72, columnspan=1)
f29.grid(column=23, row=78, columnspan=1)
f30.grid(column=23, row=84, columnspan=1)
f31.grid(column=23, row=90, columnspan=1)
s0 = ttk.Button(content, command=s0, text="S", width=1, style='cream2.TButton')
s1 = ttk.Button(content, command=s1, text="S", width=1, style='cream2.TButton')
s2 = ttk.Button(content, command=s2, text="S", width=1, style='cream2.TButton')
s3 = ttk.Button(content, command=s3, text="S", width=1, style='cream2.TButton')
s4 = ttk.Button(content, command=s4, text="S", width=1, style='cream2.TButton')
s5 = ttk.Button(content, command=s5, text="S", width=1, style='cream2.TButton')
s6 = ttk.Button(content, command=s6, text="S", width=1, style='cream2.TButton')
s7 = ttk.Button(content, command=s7, text="S", width=1, style='cream2.TButton')
s8 = ttk.Button(content, command=s8, text="S", width=1, style='cream2.TButton')
s9 = ttk.Button(content, command=s9, text="S", width=1, style='cream2.TButton')
s10 = ttk.Button(content, command=s10, text="S", width=1, style='cream2.TButton')
s11 = ttk.Button(content, command=s11, text="S", width=1, style='cream2.TButton')
s12 = ttk.Button(content, command=s12, text="S", width=1, style='cream2.TButton')
s13 = ttk.Button(content, command=s13, text="S", width=1, style='cream2.TButton')
s14 = ttk.Button(content, command=s14, text="S", width=1, style='cream2.TButton')
s15 = ttk.Button(content, command=s15, text="S", width=1, style='cream2.TButton')
s16 = ttk.Button(content, command=s16, text="S", width=1, style='cream2.TButton')
s17 = ttk.Button(content, command=s17, text="S", width=1, style='cream2.TButton')
s18 = ttk.Button(content, command=s18, text="S", width=1, style='cream2.TButton')
s19 = ttk.Button(content, command=s19, text="S", width=1, style='cream2.TButton')
s20 = ttk.Button(content, command=s20, text="S", width=1, style='cream2.TButton')
s21 = ttk.Button(content, command=s21, text="S", width=1, style='cream2.TButton')
s22 = ttk.Button(content, command=s22, text="S", width=1, style='cream2.TButton')
s23 = ttk.Button(content, command=s23, text="S", width=1, style='cream2.TButton')
s24 = ttk.Button(content, command=s24, text="S", width=1, style='cream2.TButton')
s25 = ttk.Button(content, command=s25, text="S", width=1, style='cream2.TButton')
s26 = ttk.Button(content, command=s26, text="S", width=1, style='cream2.TButton')
s27 = ttk.Button(content, command=s27, text="S", width=1, style='cream2.TButton')
s28 = ttk.Button(content, command=s28, text="S", width=1, style='cream2.TButton')
s29 = ttk.Button(content, command=s29, text="S", width=1, style='cream2.TButton')
s30 = ttk.Button(content, command=s30, text="S", width=1, style='cream2.TButton')
s31 = ttk.Button(content, command=s31, text="S", width=1, style='cream2.TButton')
s0.grid(column=9, row=3, columnspan=1)
s1.grid(column=9, row=6, columnspan=1)
s2.grid(column=9, row=12, columnspan=1)
s3.grid(column=9, row=18, columnspan=1)
s4.grid(column=9, row=24, columnspan=1)
s5.grid(column=9, row=30, columnspan=1)
s6.grid(column=9, row=36, columnspan=1)
s7.grid(column=9, row=42, columnspan=1)
s8.grid(column=9, row=48, columnspan=1)
s9.grid(column=9, row=54, columnspan=1)
s10.grid(column=9, row=60, columnspan=1)
s11.grid(column=9, row=66, columnspan=1)
s12.grid(column=9, row=72, columnspan=1)
s13.grid(column=9, row=78, columnspan=1)
s14.grid(column=9, row=84, columnspan=1)
s15.grid(column=9, row=90, columnspan=1)
s16.grid(column=21, row=3, columnspan=1)
s17.grid(column=21, row=6, columnspan=1)
s18.grid(column=21, row=12, columnspan=1)
s19.grid(column=21, row=18, columnspan=1)
s20.grid(column=21, row=24, columnspan=1)
s21.grid(column=21, row=30, columnspan=1)
s22.grid(column=21, row=36, columnspan=1)
s23.grid(column=21, row=42, columnspan=1)
s24.grid(column=21, row=48, columnspan=1)
s25.grid(column=21, row=54, columnspan=1)
s26.grid(column=21, row=60, columnspan=1)
s27.grid(column=21, row=66, columnspan=1)
s28.grid(column=21, row=72, columnspan=1)
s29.grid(column=21, row=78, columnspan=1)
s30.grid(column=21, row=84, columnspan=1)
s31.grid(column=21, row=90, columnspan=1)
showspeed0 = ttk.Label(content, width=5, text=show_speed0.get())
showspeed0.grid(column=10, row=3, columnspan=1)
showspeed1 = ttk.Label(content, width=5, text=show_speed1.get())
showspeed1.grid(column=10, row=6, columnspan=1)
showspeed2 = ttk.Label(content, width=5, text=show_speed2.get())
showspeed2.grid(column=10, row=12, columnspan=1)
showspeed3 = ttk.Label(content, width=5, text=show_speed3.get())
showspeed3.grid(column=10, row=18, columnspan=1)
showspeed4 = ttk.Label(content, width=5, text=show_speed4.get())
showspeed4.grid(column=10, row=24, columnspan=1)
showspeed5 = ttk.Label(content, width=5, text=show_speed5.get())
showspeed5.grid(column=10, row=30, columnspan=1)
showspeed6 = ttk.Label(content, width=5, text=show_speed6.get())
showspeed6.grid(column=10, row=36, columnspan=1)
showspeed7 = ttk.Label(content, width=5, text=show_speed7.get())
showspeed7.grid(column=10, row=42, columnspan=1)
showspeed8 = ttk.Label(content, width=5, text=show_speed8.get())
showspeed8.grid(column=10, row=48, columnspan=1)
showspeed9 = ttk.Label(content, width=5, text=show_speed9.get())
showspeed9.grid(column=10, row=54, columnspan=1)
showspeed10 = ttk.Label(content, width=5, text=show_speed10.get())
showspeed10.grid(column=10, row=60, columnspan=1)
showspeed11 = ttk.Label(content, width=5, text=show_speed11.get())
showspeed11.grid(column=10, row=66, columnspan=1)
showspeed12 = ttk.Label(content, width=5, text=show_speed12.get())
showspeed12.grid(column=10, row=72, columnspan=1)
showspeed13 = ttk.Label(content, width=5, text=show_speed13.get())
showspeed13.grid(column=10, row=78, columnspan=1)
showspeed14 = ttk.Label(content, width=5, text=show_speed14.get())
showspeed14.grid(column=10, row=84, columnspan=1)
showspeed15 = ttk.Label(content, width=5, text=show_speed15.get())
showspeed15.grid(column=10, row=90, columnspan=1)
showspeed16 = ttk.Label(content, width=5, text=show_speed16.get())
showspeed16.grid(column=22, row=3, columnspan=1)
showspeed17 = ttk.Label(content, width=5, text=show_speed17.get())
showspeed17.grid(column=22, row=6, columnspan=1)
showspeed18 = ttk.Label(content, width=5, text=show_speed18.get())
showspeed18.grid(column=22, row=12, columnspan=1)
showspeed19 = ttk.Label(content, width=5, text=show_speed19.get())
showspeed19.grid(column=22, row=18, columnspan=1)
showspeed20 = ttk.Label(content, width=5, text=show_speed20.get())
showspeed20.grid(column=22, row=24, columnspan=1)
showspeed21 = ttk.Label(content, width=5, text=show_speed21.get())
showspeed21.grid(column=22, row=30, columnspan=1)
showspeed22 = ttk.Label(content, width=5, text=show_speed22.get())
showspeed22.grid(column=22, row=36, columnspan=1)
showspeed23 = ttk.Label(content, width=5, text=show_speed23.get())
showspeed23.grid(column=22, row=42, columnspan=1)
showspeed24 = ttk.Label(content, width=5, text=show_speed24.get())
showspeed24.grid(column=22, row=48, columnspan=1)
showspeed25 = ttk.Label(content, width=5, text=show_speed25.get())
showspeed25.grid(column=22, row=54, columnspan=1)
showspeed26 = ttk.Label(content, width=5, text=show_speed26.get())
showspeed26.grid(column=22, row=60, columnspan=1)
showspeed27 = ttk.Label(content, width=5, text=show_speed27.get())
showspeed27.grid(column=22, row=66, columnspan=1)
showspeed28 = ttk.Label(content, width=5, text=show_speed28.get())
showspeed28.grid(column=22, row=72, columnspan=1)
showspeed29 = ttk.Label(content, width=5, text=show_speed29.get())
showspeed29.grid(column=22, row=78, columnspan=1)
showspeed30 = ttk.Label(content, width=5, text=show_speed30.get())
showspeed30.grid(column=22, row=84, columnspan=1)
showspeed31 = ttk.Label(content, width=5, text=show_speed31.get())
showspeed31.grid(column=22, row=90, columnspan=1)
showrepeat = ttk.Label(content, text=show_repeat.get())
showrepeat.grid(column=26, row=59, columnspan=1)
showloop = ttk.Label(content, text=show_loop.get())
showloop.grid(column=26, row=41, columnspan=1)
repeatdelay = ttk.Label(content, text="Loop Delay ", foreground="steel blue")
repeatdelay.grid(column=26, row=53, columnspan=2)
loopcontrol = ttk.Label(content, text="No. of Loops ", foreground="steel blue")
loopcontrol.grid(column=26, row=35, columnspan=2)
looptitle = ttk.Label(content, text="______LOOP CONTROL______ ", foreground="purple3")
looptitle.grid(column=26, row=23, columnspan=2)
nameCopy1 = ttk.Label(content, text="walkerworks 2016", foreground="steel blue")
nameCopy1.grid(column=26, row=106, columnspan=4)
ttk.Sizegrip().grid(column=1, row=1, sticky=(N,S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
content.columnconfigure(0, weight=3)
content.columnconfigure(1, weight=3)
content.columnconfigure(2, weight=3)
content.columnconfigure(3, weight=3)
content.columnconfigure(4, weight=3)
content.columnconfigure(5, weight=3)
content.columnconfigure(6, weight=3)
content.columnconfigure(7, weight=3)
content.rowconfigure(1, weight=1)
init(root)
root.mainloop()